unity system fonts in android

1.1k Views Asked by At

I want to use android system font to show Chinese text.
I use

var fonts = Font.GetOSInstalledFontNames(); 

to log what fonts are in device. I find this Noto Sans CJK TC.

But I called

font = (Font)Resources.GetBuiltinResource(typeof(Font), "NotoSansTC-Black.ttf");

It always shows The resource NotoSansTC-Black.ttf could not be loaded from the resource file! How can I use this font in android device. Thanks

1

There are 1 best solutions below

0
On

I think what you want is Font.CreateDynamicFontFromOSFont

font = Font.CreateDynamicFontFromOSFont("NotoSansTC-Black", 12);