-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [4.0.0-pre.2] - 2021-11-20 ### Changes - 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](https://issuetracker.unity3d.com/issues/missingreferenceexception-thrown-when-changing-scenes) and forum [thread](https://forum.unity.com/threads/tmpro-submeshui-error-when-changing-scenes.1129724/) 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](https://forum.unity.com/threads/how-can-i-submit-bugs-or-issues-for-tmp.628687/#post-8186100) for details. - Fixed potential issue when using the <mark> 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](https://forum.unity.com/threads/tmpro-submeshui-error-when-changing-scenes.1129724/#post-8462771) for details. - Fixed for text alignment mode Justified and Flush blending not working correctly when using <NBSP> in the text. - Fixed external keyboard on iOS/tvOS and Android when Hide Soft Keyboard is used - - 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 <CR> at the end of a line. Case #1362068 - Added support for <CR> 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 <ZWSP> 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 <ZWJ> 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](https://forum.unity.com/threads/fallback-to-emojis-before-fonts.1186174/) for details. - Fixed duplicated character when using custom validator in conjunction with soft keyboard. Case #1387772 - The <noparse> markup tag will now also affect inline markup tags like <br>, <shy>, 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 <a href="url"> markup tag which can be used as follows: "See <a href="http://url...">this link</a> for details.". This new markup tag is similar to the <link> 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 <a> 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
- Loading branch information
Unity Technologies
committed
Nov 20, 2021
1 parent
cec8e71
commit 75fef8b
Showing
72 changed files
with
2,829 additions
and
1,709 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Color emojis | ||
|
||
You can include color glyphs and emojis in text. To do so, import a font file that has color emojis in it and set it as the fallback emojis text assets. | ||
|
||
![](images/NativeEmojiExample.png) | ||
|
||
## Set up color emojis | ||
|
||
Create a color font asset and add it to the TMP Settings Fallback. Note this is the same as the Project Settings/TextMeshPro/Settings as depicted in the image. | ||
|
||
1. In your project, import a font file that has color emojis in it. | ||
2. Right click in the `Asset` folder, and then select **Create > TextMeshPro > FontAsset > Color**. This ensures that you create the font asset with the right shader (Sprite) and the right atlas rendering mode (Color). | ||
3. Open the TMP Settings asset or alternatively via the **Edit > ProjectSettings > TextMesh Pro > Settings**. | ||
4. Add the emoji font asset to the **Fallback Emoji Text Assets** section. | ||
|
||
![](images/FallbackEmoji.png) | ||
|
||
Alternatively, assigning a color font asset to the text object will work fine provided that the [Emoji Fallback Support](ColorEmojis) option in the Extra Settings of the text component is disabled. | ||
|
||
## Include emojis in text | ||
|
||
To include emojis in text, do the following: | ||
|
||
- Include emojis in text through their Unicode. For example, enter `\U00001f60` to represent a smile. | ||
- Use OS Virtual Keyboard. | ||
- Copy the emojis from an external Text Editing tool and paste them in your text field. | ||
|
||
To find more information about the Unicode Emojis Standard, see this [link](http://unicode.org/Public/emoji/14.0/). | ||
|
||
## Control Emoji Fallback Search | ||
|
||
The "Emoji Fallback Support" option controls where we search for characters defined in the Unicode Standards as Emojis. | ||
|
||
When this option is enabled (default), the "Fallback Emoji Text Assets" list will be search first for any characters defined as Emojis. | ||
|
||
When this option is disabled, the Primary font asset assigned to the text component will be searched first. | ||
|
||
Basically, this option overrides the character search to prioritize searching thru the "Fallback Emoji Text Assets" list first when the character is an emoji. | ||
|
||
This option is also useful when a font contains black-and-white emojis as it allows the user to control if the emojis contained in the primary will be used or those from the "Fallback Emoji Text Assets" list. | ||
|
||
To update the `Emoji Fallback Support`: | ||
1. Select the **Text (TMP)** field in the hierarchy. | ||
2. In the Inspector window, under the `Extra Settings` foldout of the **Text (TMP)** field, select the **Emoji Fallback Support** toggle. | ||
|
||
![](images/EmojiFallbackSupport.png) | ||
|
||
## Limitations | ||
|
||
The color emojis feature has the following limitations: | ||
|
||
- It doesn't support some OpenType font features, such as chain context and single substitution. | ||
- It doesn't support Apple fonts that use the AAT format. It's a predecessor to OpenType. | ||
- It doesn't support SVG color glyphs. | ||
- Dynamic OS FontAsset has limited support on some iOS devices. The `Apple Color Emoji` font file found on OSX and several iOS devices works fine. However, the `Apple Color Emoji-160px` found on newer iOS devices is not support as the emoji's are encoded in JPEG format which is not supported by FreeType. | ||
- Prior to Unity 2023.1, adding a UTF-32 through the inspector sends an error. The emojis won't display in the inspector. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.