use Gluon plugins deploy an android apk then all o

2019-08-02 05:02发布

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条回答
Explosion°爆炸
2楼-- · 2019-08-02 05:41

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.

查看更多
登录 后发表回答