The 3.2.0-pre.4 package is now available via the Package Manager for Unity 2021.x or newer.
In Unity 2021.x or newer, the package can be added by name as seen below.
To take full advantage of some of the newly added features like Color Glyphs and the ability to extract Ligature, Kerning and Diacritical Mark data from source font files at runtime, you will need to use one of these newer releases of the Unity Editor: 2021.3.16f1, 2022.2.0b13 and 2023.1.0a15.
Note that we anticipate this latest preview release to be the last version of 3.2.0 before it is released out of preview. For more information about the future of TextMesh Pro please refer to this post.
Release Notes for 3.2.0-pre4
Fixed italic horizontal displacement of punctuation. (TMPB-133)
Updated Input Field to not restore the original text when the X in the HoloLens keyboard is pressed.
Fixed MissingReferenceException when changing scenes. See case TMPB-120 and forum thread for more info.
Fixed Undo operation not correctly undoing some newly created TMP objects. Case #1400391
Fixed glyphs not being drawn in the various font asset inspector tables although present in the glyph table until unselecting and re-selecting the font asset.
Fixed incorrect line breaking when using a mixture of Latin and CJK text.
Fixed potential NullReferenceException when creating font asset with multiple atlas textures. See forum post for details.
Fixed potential issue when using the tag in conjunction with Ellipsis.
Added new âGet Font Featuresâ option in the Generation Settings of Font Assets to provide control over fetching of font feature data.
Fix potential duplication of Ligature data when using Dynamic Font Assets.
Added new âduospaceâ attribute to the <mspace=value> markup tag where the spacing of the â.â, â:â and â,â characters will be half of the value. This was added as an option when displaying numerical values using this markup tag.
With the addition of support for new OpenType Layout features such as Ligatures, Mark-to-Base and Mark-to-Mark, we have made the following changes:
The âKerningâ option in the Extra Settings of the text component inspector has been replaced by a new popup menu to independently control these features which are âkernâ, âligaâ, âmarkâ and âmkmkâ
The âenableKerningâ property has been deprecated and replaced by the âfontFeaturesâ property which is a list that contains which features are enabled on the text component.
Fixed two potential NullReferenceException related to missing material references or materials on SubMesh text objects. See forum post for details.
Fixed for text alignment mode Justified and Flush blending not working correctly when using in the text.
Fixed external keyboard on iOS/tvOS and Android when Hide Soft Keyboard is used
See ChangeLog in Package Manager for changes contained in previous releases.
Changes Worth Noting
Native Emoji and is now supported. This offers an alternative workflow to SpriteAsset for defining Emojis in TextMeshPro. Please refer to this documentation for more information on how to set up Color Emojis.
Basic OpenType font feature support. This release allows to automatically retrieve font feature data from the source font file. For more information on our current support of OpenType font feature please refer to those documentation pages.
The Kerning field from the TMP_Settings and the TextComponent has been deprecated and replaced by the FontFeature field. These will be upgraded automatically, but usage of this field through scripting will have to be updated manually.
The âExamples & Extrasâ resources will have to be reimported to remove the warnings in some scenes.
Please post any potential issues you uncover with this latest release in this thread.
The U+ is a notation to represent the Unicode code point while the other is an escape sequence. Itâs part of other escape sequences (\n, \t, \râŚ). Hereâs a wiki article on escape sequences.
Indeed! Weâve added support for emojis to TextMeshPro, but the editor itself, prior to 2023.1, uses a different TextEngine called TextNative that doesnât support emojis nor UTF-32. We are currently in the process of bringing those capabilities to the editor for 2023.1+.
And thanks for raising the issue with the doc. Iâll make sure this is addressed!
Are there any plans to support âpaltâ features?
Most professional Japanese fonts use âpaltâ features for kerning. This means that kerning of Japanese fonts cannot be done with âkernâ features alone.
For now, we only support a subset of all Opentype font features. (kern, liga, mark and mkmk). Weâve decided to release this version even with partial font features support as it still provides substantial value. We are looking to keep improving our font feature support but unfortunately, I canât provide a timeline yet.
More precisely, hereâs how it impacts emojis support:
A potential workaround would involve manually adding a ligature for a specific sequence we want to substitute. This requires opening the Font and adding the corresponding glyph index. For instance, hereâs how I would create a ligature for the US flag:
I donât know what happened. I upgraded to 2022.2.1f and I get an error with the package:
Library/PackageCache/com.unity.textmeshpro@4.0.0-pre.1/Scripts/Runtime/TMP_Text.cs(2814,35): error CS0029: Cannot implicitly convert type âuint[ ]â to âint[ ]â
How did this get into the non-beta version of Unity? Please advise.
We upgraded to 3.2.0-pre.4 for emoji support! It works for us in editor, will be testing in builds later!
Hereâs some feedback:
Like Fangh weâre also finding that the unicode string given in the docs doesnât render as expected. Hereâs a copy paste of two characters - one is an emoji (however the heck these are actually formatted), the other is the unicode string \U00001f60, as given on the docs. Fanghâs suggestion of adding an extra 0 didnât work for us (it just adds a 0 character)
Working out how to add the emoji font file was a bit tricky. The instructions are reasonably clear but prior to this I had no idea that Iâd need a font file, or even that emoji were stored in font files. Can you please supply an open source emoji font file in the package or linked on that page to help people get started? Fonts/unicode is confusing, and expecting devs to have too much knowledge on how they work might limit some folks.
Wow, emoji fonts are HUGE! I can see that itâs building a texture dynamically as emoji are used in editor, but Iâm not sure what this means for development. It doesnât look like emoji are ever removed from this texture, even when theyâre no longer in a piece of text? What does this mean for users adding emoji at runtime? Some documentation on how weâre supposed to work with this setup would be hugely appreciated! For now weâre just going to have a piece of text offscreen with all the emoji we need to work dynamically at runtime, and just eat the cost of the ones we once-used-but-now-arent.
A demo scene showing emojis working would be massively appreciated!
Not being able to see emoji in the TMP editor text field makes them very difficult to work with! Since 2023 is quite a long way off, can I suggest replacing the current âno space characterâ with something that allows them to be read?
Itâs a known issue. We are planning a new release of TMP 4.0 shortly (couple of weeks). It will contain the latest changes, emojis & font feature support, and bug fixes. Sorry for the inconvenience.
Itâs a good idea, weâll add an example scene for getting started with emojis.
More thorough documentation for Dynamic FontAsset would indeed be welcome. In the meantime, hereâs what we have. Some information on whatâs a Dynamic FontAsset here and on ClearDynamicData here. Clear Dynamic Data is used to ensure the atlas is cleared before bundling the resource in a build.
If you fear the atlas will fill up quickly, you can enable Multi Atlas Textures on the Font Asset. Itâs also covered in the aforementioned documentation.
Weâve just upgraded in another project and weâre finding that our fonts no longer show. Downgrading resolves the issue. Weâve seen this issue in the past, but we canât seem to find a solution this time. Fonts in the examples folder still work, but fonts that we import render as shown below.
Itâs the first time I see this issue. Could you report a bug through the Unity Bug Reporter and paste the ticket in thread ? Iâll have to investigate further.
[quote=âHugoBD-Unity, post:12, topic: 903690, username:HugoBD-Unityâ]
We are planning a new release of TMP 4.0 shortly (couple of weeks).
[/quote]Maybe change topic of this thread as itâs conflicting. I thought itâs about TMP 4.0.
Speaking of emojis, I wish they would work on forums. These look like some 2005 forum: :);):(:p:smile:
Hi!
While working with latest TMPro release, Iâve experienced a problem. Whenever I try to set the text with SRP shader to bold, an error "Material âArial Materialâ with Shader âTextMeshPro/SRP/TMP_SDF-URP Litâ doesnât have a float or range property â_ScaleRatioAâ " appears. In result, the letters are not thicker, they are just farther apart from each other.
What should I do to fix this? I am using TMPro 3.2.0-pre.4 on Unity 2020.3.7f1 and URP 10.4.0. Iâve already tried to remove the package and reinstall the shaders, but nothing seems to help. Thank you