Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro Version 1.4.1-Preview 1 with Dynamic SDF for Unity 2018.3 now available!

Discussion in 'UGUI & TextMesh Pro' started by Stephan_B, Jan 31, 2019.

  1. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    If all the text in the project is known ahead of time, you could create a Static font asset that contains all the known characters used in the project for CJK.

    If user input is expected then you other option is using Dynamic OS font assets which were introduced in version 2.2.0-preview.3 for Unity 2019.4 and version 3.2.0-pre.3 for Unity 2020.3 or newer.

    Dynamic OS font assets behave like Dynamic font assets in the editor. You still have to import their source font file in the project and create the font asset from it. Ie. same workflow as creating and using a Dynamic font asset.

    When creating a build, the source font file for Dynamic font assets is included in the build. With Dynamic OS font assets, the source font file is not included.

    At runtime on the target platform, when the application is launched, we get a list of all system fonts by Family and Style names. Then we trying to add characters and glyphs to this font asset, we check if a font file with the same Family and Style name is present and if so we use this system font file.

    To use Dynamic OS font assets, you have to know what font files are available on the platforms / devices you are targeting. All major platform publish lists of what fonts are available for their various OS releases.

    I have previously made several posts about Dynamic OS font assets so it may be worthwhile to review some of those.
     
    Grandtrine likes this.