Skip to main content

Customize Font

Player Network allows you to change the font of the LEVEL INFINITE PASS login widget. Follow the instructions in this article to customize the login widget for your game client.

Font

Unity does not provide font asset files by default, call the SetPriorityFont API to change fonts before opening the LI PASS UI. If not specified, Unity Arial font is used by default.

note

The Arial font used in Unity is unable to render Thai properly on iOS, more details regarding the issue can be found from the Unity Issue Tracker.
If Thai display is required, other specialized Thai font assets are recommended for accurate display. For information regarding configurations, see Multilingual fonts.

Font acceptance

Run the game in either the editor or on a real device to verify whether the font has changed as expected.

For example, the default font Lato has been updated to Tencent Sans.

Lato:

Tencent Sans:

Multilingual font

To solve the problem that fonts cannot be displayed properly under different character encodings, add default fonts in the FontName fields for the imported fonts.

FontNames formats:FontName1,FontName2,FontName3

Image: Unity Font

For more information, see Font assets.

When Unity tries to render text with a dynamic font, but it cannot find the font (because Include Font Data was not selected, and the font is not installed on the user machine), or the font does not include the requested glyph (like when trying to render text in east Asian scripts using a latin font, or when using styled bold/italic text), then it will try each of the fonts listed in the Font Names field, to see if it can find a font matching the font name in the project (with font data included) or installed on the user machine which has the requested glyph. If none of the listed fallback fonts are present and have the requested glyph, Unity will fall back to a hard-coded global list of fallback fonts, which contains various international fonts commonly installed on the current runtime platform.

—— Unity Documentation

Multilingual font acceptance

Run the game in either the editor or on a real device to verify whether the font has changed as expected.

If the game only has one font, it is possible to switch between two languages for testing the multilingual adaptation of the UI interface.

If the game uses different fonts for different languages, it is recommended to switch between the languages that use different fonts for acceptance testing.
For example, English and Chinese may use Font A, while Thai uses Font B. Therefore, during acceptance testing, you may choose to switch between English (Font A) and Thai (Font B) to confirm the results.

The following is an example of a single font being adapted for both English and Chinese:

English:

Chinese: