TextCore: GlyphAdjustment table contains many nonsensical pairs not found in Unity 2022

Unity 6000.0.b15 appears to have a TextCore bug extracting the GlyphAdjustment table, which contains many non-sensical adjustment pairs (that reference glyphs not found in the character table): Build Font asset with these settings: LiberationSans.ttf–>Menue–>Create–>TextCore–>FontAsset, Update Atlas Texture (static atlas, extended ASCII, select “get font features”):
Unity 6000.0.b15:

Unity 2022.3.21f1:

Amongst the 543 GlyphAdjustment in Unity 6000.0.b15: there is a lot of stuff like this:
What character is Unicode 3583? Pretty sure this is not amongst extended ASCII.

Hi @Fribur !

We’ve added support for the automatic extraction of some Font Features in U6 and this includes kerning. Reading the Font file is expensive so when we encounter a Glyph that doesn’t have Kerning data populated, we fetch all Glyph Adjustment for this particular glyph. This means we also fetch kerning for glyph that are not yet part of your FontAsset.

Note that the ID is the Glyph ID, not the Unicode. I concur this design could be optimized for static FontAsset as we do not need to fetch Kerning data for glyph that are not part of the FontAsset.

1 Like

Many Thanks for swift response and the clarification!

1 Like