Version: Unity 6.7 Alpha (6000.7)
Language : English
Use the legacy Text Core in UI Toolkit
Test UI

Migrate static font assets to Advanced Text Generator

The default Advanced Text Generator doesn’t support static font assets. If your existing project uses them, you must migrate them so your UI text elements render correctly.

The recommended way to migrate is to convert the static font asset to dynamic in the Inspector window. The conversion happens in place, so all references to the font asset keep working, and it preserves the optimizations static font assets are commonly used for: the baked atlas is kept, and the source font is subset so only the baked characters ship in builds.

If you prefer to migrate manually, choose your approach based on your original optimization goals for the static assets:

Convert a static font asset to dynamic

When you select a static font asset, the Inspector window displays a warning that static font assets aren’t supported, along with a Convert to Dynamic button.

To convert a static font asset:

  1. In the Project window, select the static font asset.
  2. In the Inspector window, select Convert to Dynamic.

The font asset switches to the Dynamic atlas population mode and keeps its atlas, material, and references. Unity subsets the source font to the characters baked into the atlas, so builds don’t grow by the size of the full font file. You can review or change the subset in the Font Subsetting section of the Inspector.

If the source font file has changed since the atlas was generated, the baked glyphs no longer match it and the Convert to Dynamic button is disabled with a warning. Regenerate the atlas with the Font Asset Creator first, then convert.

Reduce memory footprint

If you created the static font asset mainly to ship a smaller character set, create a dynamic font asset and subset its source font.

This reduces the font file size and can further lower memory usage because it eliminates the need for a pre-populated atlas texture. For reference, an atlas texture in Alpha 8 is approximately:

  • 1024 × 1024 → ~1 MB
  • 2048 × 2048 (common for CJK) → ~4 MB

To migrate, do the following:

  1. Identify the characters or scripts required by your UI.
  2. Create a dynamic font asset from the original font file.
  3. Subset the source font in the font asset’s Font Subsetting section.
  4. Replace all references to the static font asset (USS/UXML/C#).

Optimize startup or first-frame behavior

If you used a static font asset mainly to pre-populate an atlas (to reduce runtime glyph generation during startup), the equivalent workflow in Advanced Text Generator is to use a dynamic font asset and pre-populate its atlas with a chosen character set.

Note: With SDFAA atlas rendering mode, many projects no longer need to pre-populate an atlas for acceptable first-frame performance. However, if you still require control or warm-up of glyph generation, Advanced Text Generator supports the workflow through a dynamic font asset.

To migrate, do the following:

  1. Create or select a dynamic font asset
  2. In the Font Asset Creator window, load the dynamic font asset.
  3. Populate the atlas with the desired character set.
  4. Replace all references to the static font asset (USS/UXML/C#).

Remove static font assets without preserving font-asset-specific optimizations

If you don’t need memory reduction nor startup optimization, you can replace static font references directly with the Unity font asset imported from the typeface file, such as .ttf or .otf.

This requires no font-asset creation step; however, you lose font-asset-specific customization options.

To migrate, do the following:

  1. Locate the corresponding Unity font asset (the imported typeface) in the project.
  2. Replace references to the static font asset with the Unity font asset (USS/UXML/C#).

Your UI text elements can now render correctly, and you can take advantage of Advanced Text Generator’s enhanced text rendering features going forward.

Additional resources

Use the legacy Text Core in UI Toolkit
Test UI