我是Libgdx乞讨者。
我正在尝试使用scene2d UI制作游戏菜单。
一旦英文版本完成,我现在将创建韩语,日语和中文版本。
但是..。亚洲字母看不见或出来时很奇怪..
所以我用bitmapfont检查了字体(以下代码)
<在构造函数处>
font = new BitmapFont(Gdx.files.internal("skin/lotte.fnt"), Gdx.files.internal("skin/lotte.png"), false);<在draw方法中>
game.batch.begin();
font.draw(game.batch, "안녕하세요?", gameViewport.getWorldWidth()/2,gameViewport.getWorldHeight()/2);
game.batch.end();上面的韩文字母效果很好。但它不适用于scene2d UI皮肤。
scene2d UI外观不支持亚洲字母吗?
发布于 2018-03-03 19:21:25
我解决了这个问题。
从I18NBundle读取字符串时出现问题。
下面的代码有这个问题,
Label titleLabel = new Label(bundle.get("strings/test"), skin, "lotte2", Color.BLACK);
tbl.add(titleLabel).padBottom(stage.getHeight()/20f).row();但这段代码运行良好。
Label titleLabel = new Label("ㄱㄴㄷㄹㅁㅂㅅ", skin, "lotte2", Color.BLACK);
tbl.add(titleLabel).padBottom(stage.getHeight()/20f).row();感谢你的"Tenfour04“和"Madmenyo”!
https://stackoverflow.com/questions/49073061
复制相似问题