FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("data/unbom.ttf"));

FreeTypeFontParameter parameter = new FreeTypeFontParameter();
parameter.size = 18;
parameter.characters = "한국어/조선�?";

BitmapFont koreanFont = generator.generateFont(parameter);

parameter.characters = FreeTypeFontGenerator.DEFAULT_CHARS;
generator = new FreeTypeFontGenerator(Gdx.files.internal("data/russkij.ttf"));
BitmapFont cyrillicFont = generator.generateFont(parameter);
generator.dispose();

参考链接 https://github.com/libgdx/libgdx/wiki/Bitmap-fonts

posted on 2021-03-28 10:27  黑狱  阅读(111)  评论(0编辑  收藏  举报