Added runic font

This commit is contained in:
Willem 2022-02-09 16:39:31 +01:00
parent 458ffff56a
commit 5d5e57d086
3 changed files with 7 additions and 5 deletions

View file

@ -4,11 +4,12 @@
"description": "Convert font data to XML intermediate.",
"private": true,
"scripts": {
"start": "npm run-script conv0 && npm run-script conv1 && npm run-script conv2 && npm run-script conv3",
"conv0": "node conv-font.js ../main-gdxapp/assets/font/FreeSans.ttf > bin/FreeSans.ttf",
"conv1": "node conv-font.js ../main-gdxapp/assets/font/NotoSansCJKjp-Medium.otf > bin/NotoSansCJKjp-Medium.otf.xml",
"start": "npm run-script conv0 && npm run-script conv1 && npm run-script conv2 && npm run-script conv3 && npm run-script conv4",
"conv0": "node conv-font.js ../main-gdxapp/assets/font/free-sans.ttf > bin/free-sans.xml",
"conv1": "node conv-font.js ../main-gdxapp/assets/font/noto-sans-cjkjp-medium.otf > bin/noto-sans-cjkjp-medium.xml",
"conv2": "node conv-font.js ../main-gdxapp/assets/font/roboto-bold.ttf > bin/roboto-bold.xml",
"conv3": "node conv-font.js ../main-gdxapp/assets/font/arslan-wessam.ttf > bin/arslan-wessam.xml",
"conv4": "node conv-font.js ../main-gdxapp/assets/font/norse-kawl.otf > bin/norse-kawl.xml",
"debug": "node conv-font.js ../main-gdxapp/assets/font/roboto-bold.ttf"
},
"dependencies": {

Binary file not shown.

View file

@ -43,10 +43,11 @@ public class ImGuiSetup {
addRangeUnicodePlane0(fontBuilder);
final short[] glyphRanges = fontBuilder.buildRanges();
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/NotoSansCJKjp-Medium.otf").readBytes(), 14, fontConfig, glyphRanges);
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/FreeSans.ttf").readBytes(), 14, fontConfig, glyphRanges);
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/noto-sans-cjkjp-medium.otf").readBytes(), 14, fontConfig, glyphRanges);
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/free-sans.ttf").readBytes(), 14, fontConfig, glyphRanges);
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/roboto-bold.ttf").readBytes(), 14, fontConfig, glyphRanges);
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/arslan-wessam.ttf").readBytes(), 14, fontConfig, glyphRanges);
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/norse-kawl.otf").readBytes(), 14, fontConfig, glyphRanges);
fontConfig.destroy();
}