How can I detect system Chinese, Korean, and English fonts without embedding one for each? (AIR mobile on Android and IOS)

不羁的心 提交于 2020-01-24 05:24:33

问题


My learning app requires displaying Korean, English and Chinese. One solution I have is to embed a Korean/English font and a Chinese font. Then put together a string with different TextFormats.

The thing is, I'm positive that IOS and Android devices should contain native Chinese, Korean and English fonts already, and I'd much rather refer to and use those fonts instead of packing them.

I tried detecting fonts by using Font.enumerateFonts(true), but when I use font.hasGlyphs('你'), I don't get a true, or anything, so I don't know how to choose the proper device font.

If that doesn't work, is there a font that contains all of those Characters? Or maybe a font-builder program that'd allow me to customize a font to include


回答1:


This was something that I wrote sometime back http://blogs.adobe.com/airodynamics/2012/08/21/supporting-languages-with-unicode-characters/ Hopefully it helps you

You can always know the name of font specific to the language. May be this http://support.apple.com/kb/HT5878.

Now based on the language you want to show just change the value of font in the statement format.font and the correct language should come up.



来源:https://stackoverflow.com/questions/23390203/how-can-i-detect-system-chinese-korean-and-english-fonts-without-embedding-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!