*** 3.2.0-pre.4 Release Now Available! ***

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.
8673222--1168665--Untitled (1).png

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.

  • Color emojis | TextMeshPro | 3.2.0-pre.10

Upgrade Notes

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

12 Likes

3.2.0-pre4 doesn’t support emoji modifier???

seems like it
8680053--1170135--upload_2022-12-22_14-12-35.png

8680053--1170141--upload_2022-12-22_14-36-42.png

1 Like

in documentation :

  • Include emojis in text through their Unicode. For example, enter \U00001f60 to represent a smile.

The correct text is :

  • Include emojis in text through their Unicode. For example, enter \U00001F600 to represent a smile.

however, why emojipedia and every other sites uses U+1F600 and Unity uses U00001f600 ?

1 Like

When I copy paste an emoji inside my TextMeshPro it does display in the scene but it does not display in the inspector :

1 Like

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!

2 Likes

@HugoBD-Unity btw, is there any workaround for the chain context limitation. Are there plans to support it eventually?

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:

  • Emoji ZWJ Sequences are not supported. (link)
  • Country Flags are not supported.
  • Emoji modifiers are not supported.

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:
8702382--1174845--CleanShot 2023-01-03 at 14.01.09.png

1 Like

Hi HugoBD,

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)
    8706834--1176000--upload_2023-1-5_10-4-53.png

  • 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?

2 Likes

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.

1 Like

Big thanks for the feedback @tomkail_betterup !

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

Are there plans to properly support addressables and TMP together?

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.

1 Like

Hi @tomkail_betterup !

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: :);):(:rage::face_with_spiral_eyes::sunglasses::p:smile::hushed::sweat_smile::roll_eyes::eyes:

2 Likes

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 :slight_smile:

Got it! I had to reimport TMP Essential Resources. Might be worth this happening automatically, or flagging a warning, or something?

3 Likes

Hi @Krzys292 ! I think it’s the same issue, can you try reimporting the TMP Essential Resources ?

Your issue seems similar to the one in this thread