use Gluon plugins deploy an android apk then all of the chinese charactor is not disapear

本小妞迷上赌 提交于 2019-12-24 03:23:18

问题


I creat a gluon project use multi view project(FXML) ,then I just modify the buttons character to chinese . the project run under desktop it's no problem but using android->android to deploy an apk and when install on android phone or andorid simulator and run it all of the chinese charactor is not dispear!


回答1:


By default Gluon Mobile uses Roboto font, which doesn't include Chinese characters.

One easy way you can solve this issue is by setting any of the Android system fonts that do include them.

Using Font.getFamilies() on my Android device I discovered this one: Noto Sans CJK SC Regular.

So you can easily add this to the view's css file:

.view {
    -fx-font-family: "Noto Sans CJK SC Regular";
}

That should work.



来源:https://stackoverflow.com/questions/44178068/use-gluon-plugins-deploy-an-android-apk-then-all-of-the-chinese-charactor-is-not

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