Author Topic: Beta Release 0.1.54 Beta 4 *** for Unity 5.2, 5.3 and 5.4 ***  (Read 2628 times)

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5687
    TextMeshPro 0.1.54 Beta 4 Release Notes
    Please carefully review the release notes before upgrading and always backup your project beforehand. These notes reflect the changes between release 0.1.52 Beta 3.1 and this new release. For quick reference here are the release notes for version 0.1.52 Beta 3.1.

    Real Beta Release - This release is considered Beta (for real) as the changes brought about the support for Multi Fonts & Sprites are pretty significant but more importantly rather difficult to anticipate all the different ways that users might end up using these new features in projects and via scripting. Besides finding potential bugs, the goal of this beta is to uncover potential workflow challenges, potentially missing API functionality, and help evolve best practices related to these new features including the Font Fallback system.

    Upgrade Note - Since Unity's Asset Importer doesn't remove older files or can get confused at times, you have to remove the previous installation of TextMesh Pro by deleting the "TextMesh Pro" folder. This process works well as long as you didn't save any font assets, materials or any files inside the TextMesh Pro folder hierarchy. If that is the case, then be sure to backup those files first.

    Important Note I - This release still includes significant changes to both TextMeshPro components. This new release will also affect previously created objects that were using sprites so as usual and despite all the testing I have done with various scenes and projects, please make sure you backup your projects before upgrading to be on the safe side.

    New Features and Functionality
    • Added support for Multi Fonts & Sprites. I am currently working on an updated video for this feature. In the meantime see the following video which will still provide a good overview of this new feature.
    • Added new <font> tag. Note the name of the font and material are case sensitive.
      • <font="IMPACT SDF">
      • <font="IMPACT SDF" material="IMPACT SDF - Drop Shadow">
      • </font> switches to the previously used font.
      • <font="Default"> switches to the default font assigned to the text object.
    • Revised <sprite> tag implementation. Note The sprite assets must be located inside "Resources/Sprites/..." folder.
      • <sprite=index>
      • <sprite name="Name of sprite">
      • <sprite="Name of Sprite Asset" index=index>
      • <sprite="Name of Sprite Asset" name="Name of sprite">
      • As per the previous release, the "tint" and "color" attribute can also be added to the sprite tag.
    • Added support for Font Fallback which can be defined in the TMP Settings file. See the following video for further details.

    Improvements & Fixes
    • Fixed an issue where the reference to the CanvasRenderer could be lost.
    • Fixed an issue where the text alignment could be wrong when using Overflow - Ellipsis or Truncate mode.
    • Fixed issue where anchor positions of the Text Container when loading a scene created with a previous version of TextMesh Pro.
    • Fixed an issue with scaling where the text could be rendered as blocks.
    • Improved how fading of the face, outline and underlay portions of the text is handled in the shader.
    • Updated the Font Asset Creator to improve handling of OTF fonts.
    • Improved handling of ZTest when using the Canvas system.
    • Fixed a few minor issue related to the Text Container and newly added support for RectTransform.
    • Fixed an issue related to text alignment when using sprites.
    • Improved handling of Line Height and Line Spacing.
    • Font Asset Creator now shows Hex value of missing glyphs as well as Decimal value.
    • Improved handling of Undo / Redo related to Material Preset Drag-n-Drop functionality.
    • Updated how the SDF Scale is updated when only the scale or lossyScale of a text object is changed.
    • Fixed an issue where using the color or tint attribute with the sprite tag would affect all sprites.
    • Fixed null reference issue which could occur when getting preferred values on disabled objects.
    • Added _ClipRect property to the material debug panel. This is used for debug purposes.
    • Improved upgrade compatibility with pre Unity 4.6 releases.
    • Added tintAllSprites to TMP Settings.
    • Kerning is now disabled by default in the TMP Settings file since most users don't import kerning pairs in the first place.
    • Fixed a minor issue related to word counting when using quotes at the start of the text input.
    • Fixed a minor issue with the <nobr> </nobr> tags not working with East Asian languages.
    • Updated the list of leading and following line breaking characters for East Asian Languages.
    • Added support for Zero Width Space.
    • Added the beta RTL support to the TMP UGUI component.
    • Fixed an issue where re-parenting a text object to another canvas result in some events being ignored.
    • Added new overload for SetText to use StringBuilder.
    • SDF scale encoding is now using the lossyscale.y due to Unity's CanvasScaler change in 5.4.0b5.
    • Repacked the sprites used in the Default Sprite Asset into a smaller 512 X 512 texture.
    • Text objects now properly get refreshed when new Fallback Fonts are added to the list. [Beta 1b]
    • Sub Text objects are now created using the same Layer as parent. [Beta 1b]
    • Sub Text objects using the Mesh Renderer are now created with the same Sorting Layer and Sorting Order as their parent. [Beta 1b]
    • Fixed an issue where material references would be lost on object using a material preset and UI.Mask when updating from a previous release. [Beta 1b]
    • Made a minor change to the UpdateSDFScale to avoid updating it when the text is either empty or null. [Beta 1b]
    • Fixed an issue with the shaders which resulted in text objects not being visible in Unity 5.2. [Beta 1b]
    • Added the ability to assign a new Material Preset to multiple text objects via Drag-n-Drop. This works as long as the text objects share the same Font Asset and Material. [Beta 1b]
    • Fixed an issue related to UI.Mask and material references eventually getting lost as object are enabled and disabled.[Beta 1b]
    • Fixed an issue where bold text was no longer bold when scaling.[Beta 1b]
    • The sprites used by text objects in the scene will now update right away when changing the Default Sprite Asset assigned in the TMP Settings file. [Beta 1b]

    Beta 1c
    • Fixed an issue when using the sprite name tag attribute that was resulting in allocations.
    • Improved how missing glyphs are handled. The assigned Font Asset will be searched first. Next the Font Fallback list will be searched. If the glyph is not located, TMP will then look for the missing glyph character (9633) in first the currently assigned Font Asset. Next the Font Fallback list followed by the Default Font Asset assigned in the TMP Settings file and lastly try to locate the ARIAL SDF font asset. In the event neither of these glyphs can be located, the character will be skipped.
    • Added the ability to define Fallback Font Assets for individual Font Assets in the Font Asset Editor Panel. See the following post for details.
    • Fixed an issue where the font atlas texture reference could be lost in Material Presets when updating a Font Asset and saving over it.
    • Added a new context menu option in the texture editor to allow copying the Font Atlas Texture from the Font Asset. See the following thread and video for details.
    • Updated GetStencilID() to avoid allocations.
    • Fixed an issue resulting in the xAdvance value of characters in CharacterInfo not being accurate.
    • Fixed an issue related to linefeed where a long word on the subsequent line would not render correctly.
    • Added validation on sprite tag index and name.
    • Fixed a minor issue that would cause the wrong atlas to be used when a new font or material is assigned via scripting.
    • Improved how TMP Settings are loaded and accessed.
    • Fixed an issue where the underline thickness was incorrect due to the scale of sprites.
    • Fixed an issue where the vertex color gradient was affecting the sprite color regardless of the tint attribute value.
    • Added check to filter out duplicate kerning pairs from font files.
    • Fixed an issue in the Font Asset Creator that was causing the default material to not have a valid reference to the font atlas texture. This only occurred on first use.
    • Fixed a minor issue with Match Aspect Texture mapping option.
    • Sprites are no longer affected by bold or italic styles.
    • Added new Context Menu to the Sprite Asset Editor to Add Default Material to the selected Sprite Asset.
    • Fixed an issue where the GetLinkID() function would not return the correct value when the link was part of a style tag.
    • Fixed a minor issue with the <noparse> and </noparse> tags.

    Beta 2
    • Fixed an issue to make sure lineInfo.lineExtents data is correct
    • Added property bool isRightToLeftText to enable or disable RTL support.
    • Fixed an issue where the Cast Shadow property on the Mesh Renderer would always get set to On when using one of the surface shaders.
    • Added drawing of LineExtents in the TextInfoDebugTool.cs. LineExtents are drawn as grey lines.
    • Added the ability to select a Material Preset from the TMP Inspector panel. See video
    • Added CrossFadeColor() and CrossFadeAlpha() functions to the TMP_Text class. These functions mirror the functionality of the Graphic.CrossFadeColor and Graphic.CrossFadeAlpha functions.
    • Improved handling of text input when using the .text property. The source string will no longer be parsed.
    • Added control over Escape Characters parsing in the Inspector Text Input Box. Added this new property to the TMP Settings file as well as in the Extra Settings Panel.
    • Made a minor change to further improve the handling of SDF Scale.
    • Added the ability to drag-n-drop any Material Preset on the Material Inspector and have the Font Asset and Material automatically switch to the matching Font Asset and Material. (see video)
    • Added new UI - TextMesh Pro - Input Field. (Alpha)
    • Fixed a minor issue with word tracking where quotes (single) we included as part of the word.

    Beta 3
    • Made a minor change to the handling of missing glyphs where a space will be used when no other possible glyph has been found in the font asset, fallbacks or default font asset.
    • Fixed a minor issue with the <cspace> tag where text alignment would be incorrect.
    • Fixed a minor issue with word tracking related to single and double left and right quotes.
    • Added a few more Punctuation characters to the Extended ASCII set in the Font Asset Creator.
    • Fixed an issue where the Material Preset list in the Inspector would not update correctly when no font asset is selected.
    • Legacy InlineGraphicManager will now automatically be removed as well as any child inlineGraphic objects.
    • The TMP_CharacterInfo.vertexIndex has been changed to an int instead of short.
    • Added new property bool useMaxVisibleDescender to control whether the text's vertical alignment will be adjusted when using MaxVisibleCharacters.
    • Fixed an issue with line breaking for CJK where certain characters were not breaking correctly.
    • Font Asset embedded Default Material and Font Atlas Texture are now accessible in the project window.
    • Improved the ability to assign a new material and font asset to a text object via Drag-n-Drop. See video
    • Missing glyph character can now be defined in the TMP Settings file.
    • Added new overload to ForceMeshUpdate(bool ignoreActiveState) to make it possible to regenerate the text object even if disabled.
    • Added the ability to retrieve the characters from an existing font asset when using the Custom Options in the Font Asset Creator. See video
    • Line breaking Leading and Following character lists are now defined in the TMP Settings and a shared resource for all font assets.
    • Added support for Bold and Italic typeface which can now be assigned per font asset in the Font Asset Editor inspector.
    • Fixed the text not disappearing when disabling the text component instead of the gameobject.
    • Added the Keyword_Outline to the ShaderUtilities class to make it easier to enable the outline shader keyword used by the shaders.
    • Made some improvements to the handling of Material Presets when using alternative typefaces (font-weights) and fallback fonts. Release 3a.
    • Fixed an issue causing an error related to font-weights when older font assets are used.Release 3a.
    • Added support for Hyphens in the handling of Line Breaking.Release 3b.
    • Fixed an issue with Justified text alignment where using characters like No-width space would result in incorrect alignment.Release 3b.

    Beta 4
    • ON_TEXT_CHANGED event is now also called when clearing a text object.
    • It is now possible to change the color of the text object by modifying the Graphic.color since Unity made the color property of the Graphic class virtual.
    • Fixed an issue where changing the normal and bold weight of the Font Asset would not affect Material Presets for the given font asset.
    • Improved the searching of Material Presets used in conjunction with the Material Preset pulldown menu of the text object inspector.
    • Shader files have been renamed with the TMP_ prefix instead of TMPro_
    • Shaders are now located in the shader pulldown "TextMeshPro/..." instead of "TMPro/..."
    • Fixed a potential allocation issue with linkInfo.
    • Added a custom inspector for the Mesh Renderer to make it possible to track Material Preset assignment via the Mesh Renderer material property.
    • Added Match Material Presets option in the TMP Settings file to control whether Fallbacks will use the current material preset or the Default Material of the Fallback font asset.
    • Fixed an issue with the Font Asset Creator where not all kerning pairs would get imported on Windows.
    • Updated how tabs are handled to behave more like tab stops.
    • Fixed an issue when renaming sprites in the Sprite Asset Editor.
    • Fixed an issue with SDF Scaling when changing the scale of the text object while using alternative typefaces.
    • Fixed an issue with sprites and font asset with numerical values as names where they would fail to load.
    • Fixed an issue with the computation of preferred values that was affecting the data contained in characterInfo.
    • Fixed an issue where the .bounds property would be incorrect when using multi fonts and sprites.
    • Added TextMeshPro.renderedWidth and TextMeshPro.renderedHeight properties
    • Added TextMeshPro.textBounds property.
    • Added TextMeshPro.GetRenderedValues() function which returns the width and height of the rendered text.
    • Fixed Null Reference Exception with Dropdown selection due to a recent change in Unity 5.4.
    • Dropdown component has now been added to the TMP package.
    • Newly created TMP objects via the Create Context menu are now automatically selected upon creation in the scene view.
    • Selecting the Sprite Asset material now shows the sprite atlas texture which can be used to fix missing atlas texture references.
    • Added the ability to select Sprites in the Sprite Asset as well as Add and Remove sprites from the Sprite Asset. See updated Sprite Asset and <sprite> tag video.
    • Fixed an issue with nested style tags where the closing style wasn't applied properly.
    • Added additional overload for TMP_FontAsset.HasCharacter(char c, bool searchFallbacks) which will also search through the fallback font assets as well.
    • Fixed an issue with the text input field where IME input was not working correctly.
    • Fixed an issue with word counting where an index out of range error could occur based on characterInfo allocations.
    • Added ability to set the default point size of newly created text objects in the TMP Settings file.
    • Added to the TMP Settings file the ability to define the location of the Sprite Assets relative to a Resources folder.
    • Fixed an issue where checking preferred values could cause the text object to not be rendered.
    • Uppercase variants of the rich text tags have been added. Note that tag values remain unchanged and are still case sensitive.
    • Added a new shader - Mobile Distance Field - Masking which provides support for soft masking with the 2D RectMask and Masking Texture. See the following example.

    Note (1) - I will also have a separate release of this new version for Unity 5.0 / 5.1.

    Note (2) - In Unity 5.4, you will get some warnings about line ending. This is resulting from Unity modifying the shader files on import to add the following comment "// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'" and changing the shader source code to address the shader define change they have made in 5.4.

    Note (3) - When using the <sprite> tag, the InlineGraphicManager component is no longer needed and can be safely removed. The sub objects that were using the InlineGraphic component can also be removed as they will be replaced by the new TMP Sub object of the appropriate type.

    Note (3.1) - As a result of changes that Unity made related to the 2D RectMask, Sprite Assets now have their own default material which uses the TMPro/Sprite shader. When creating new Sprite Assets, a default material will be automatically assigned to the Sprite Asset. However, Sprite Assets created prior to this release will be missing this default material causing them not to render. In order to address this, you will need to regenerate the Sprite Asset by selecting the sprite from which the sprite asset was created, and right-click "Create > Sprite Asset", which will set the default material correctly.

    Note (4) - Due to a changes related to the handling of Masking (2D Rect Mask), when using the normal TMP objects with previously created materials, you most likely will have to reset the _ClipRect property in the Material Inspector to a value of (-10000, -10000, 10000, 10000). See

    Note (5) - In Unity 5.4, you might be getting warnings about inconsistent line endings in some of the shader files. This is a result of Unity modifying those files on import due to them renaming a shader variable between Unity 5.3 and 5.4. They also add the following note to the shaders "// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'"

    Note (6) - Handling of Material Preset with Typefaces (font-weights) and Fallback has been improved. However, I still need to resolve an issue when presets are manually assigned to child submeshes.

    02-16-2016 - Replaced the package by a newly exported version in Unity 5.2 due to a bug in Unity 5.3 where .bundles are stripped out of the exported package.
    02-28-2016 - Release 0.1.54 Beta 1b includes the fixes referenced above. I am still waiting on feedback from some users on open issues. As soon as those are resolved, I'll get another update out.
    03-25-2016 - Release 0.1.54 Beta 1c - See notes above.
    04-03-2016 - Release 0.1.54 Beta 2 - See notes above.
    04-25-2016 - Release 0.1.54 Beta 3 - See notes above.
    04-28-2016 - Release 0.1.54 Beta 3a - See notes above.
    05-01-2016 - Release 0.1.54 Beta 3b - See notes above.
    06-15-2016 - Release 0.1.54 Beta 4 - See notes above.[/list][/list]