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.
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