The following releases of the TMP package are now available via the Package Manager. These are version 2.2.0-preview.3 for Unity 2019.4 and version 3.2.0-pre.3 for Unity 2020.x or newer.
These two (2) releases are identical in terms of features and functionality but specific to each Unity releases which is required to address some API and other changes to Unity.
Release Notes for Preview 3
******************
- Fixed a potential IndexOutOfRangeException when trying to select any portions of text in an Input Field whose child text component is using Overflow mode Truncate or Ellipsis where due to RectTransform width and / or height restrictions have results in the text being fully truncated. Case #1361032
- Fixed incorrect character sequencing in the Input Field when using Japanese IME in UWP builds. Case #1374755
- Fixed several potential IndexOutOfRangeException in the Input Field when text is fully truncated when using Text Overflow mode Ellipsis or Truncate.
- Fixed Input Field incorrect caretPosition and / or stringPosition properties when updating these via scripting. Case #1334622
- Fixed incorrect event handling on UWP and Hololens 2. Case #1357718 and Case #1351006
- Fixed Input Field OnSelect event potentially firing twice on some mobile devices including Microsoft Surfaces.
- Fixed Input Field incorrect caret insertion position when text contains a Carriage Return at the end of a line. Case #1362068
- Added support for markup tag.
- Added value range check for the text component margins located in the text component extra settings. Case #1365554
- Added new overload to the TMP_FontAsset.CreateFontAsset() to enable creating font asset instances using a file path.
- Added new TMP_ResourceManager.RemoveFontAsset() function to remove a font asset from the TMP Resource Manager. This new function would typically be used prior to unloading bundles and / or resources.
- Warnings about potentially missing character 0x5F used to display underline or strikethrough will only be displayed when using those features when Display Warning is enabled in the TMP Settings.
- Fixed incorrect handling of â-â at the end of a line when using Text Overflow Page mode. Case #1382173
- Fixed incorrect line breaking when a hyphen â-â is preceded by a space. Case #1391990
- When using Text Wrapping Mode - Preserve White Space or Preserve White Space No Wrap, the character will now contribute to the preferred height when it is the first and only character on a new line.
- Added ClearFontAssetGlyphCache() function to the TMP_ResourcesManager to enable clearing the font asset fallback glyph cache.
- Added new markup tag.
- Added ability to define a list of fallback text assets in the TMP Settings to be used for Emojis.
- Added new property âemojiFallbackSupportâ to text components which is also exposed in the extra settings section of the text component inspector. When enabled, this will prioritize searching the Emoji Fallback Text Assets before the primary font asset for characters defined as Emoji in Unicode 14.0. See forum post for details.
- Fixed duplicated character when using custom validator in conjunction with soft keyboard. Case #1387772
- The markup tag will now also affect inline markup tags like
, , etc. - Fixed newly created StyleSheets having two Normal styles.
- Added new Double Pass SDF shader and example scene to the TMP Examples & Extras to showcase this new shader.
- Added new context menu option to manually âclear dynamic dataâ of a dynamic font asset. This performs the same clearing of data as the âClear Dynamic Data on Buildâ option when manually triggered.
- Added new markup tag which can be used as follows: âSee this link for details.â. This new markup tag is similar to the tag but does not use an ID.
- Added new âAâ style to the Default Style Sheet referenced in the TMP Settings. This âAâ style defines the styling of the new markup tag.
- The TMP_Text.parseCtrlCharacters property which controls the interpretation and parsing of escape characters in the text componentâs Text Input box in the inspector, will now apply to all methods of setting the text on the component. Case #1400008
- Fixed potential Null Reference Exception when editing the name of a sprite character. Case #1396591
- Fixed issue where TMP_FontAsset.HasCharacters would return false when called prior to font asset initialization. Case #1394817
- Minor TMP_InputField UI improvement where âHide Mobile Inputâ property will be disabled when âHide Soft Keyboardâ property is disabled. Case #1388243
See ChangeLog in Package Manager for changes contained in previous releases.
Changes Worth Noting
- TrueType Collection (TTC) support.
- Support for new OpenType Font Features such as Ligatures and Diacritical Marks.
-
Dynamic OS Font Assets
-
Text Wrapping Mode
- Double Pass Shader
This latest release actually contains most of the changes to support native emoji and additional font features but these will require a new version of the Unity Editor as some of this functionality is contained in the TextCore FontEngine which is implemented on the native side which I am still working on. Although my release estimates have been horrible lately, I am hoping to have these changes to the FontEngine available within the next 45 - 60 days.
Here is an example of color glyph / native emoji support which includes Emoji modifier support as well as those are OpenType font features.
Please post any potential issues you uncover with these latest release in this thread.