Android中的统一系统字体

时间:2019-02-21 10:15:55

标签: android unity3d fonts system-font

我想使用android系统字体显示中文文本。
我用

var fonts = Font.GetOSInstalledFontNames(); 

记录设备中的字体。我找到了这个Noto Sans CJK TC

但是我叫

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

它始终显示The resource NotoSansTC-Black.ttf could not be loaded from the resource file! 如何在Android设备中使用此字体。 谢谢

1 个答案:

答案 0 :(得分:0)

我认为您想要的是Font.CreateDynamicFontFromOSFont

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