Added more fonts
This commit is contained in:
parent
528e6b4905
commit
3e40820a58
|
@ -4,11 +4,14 @@
|
|||
"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/code2000.ttf > bin/code2000.xml",
|
||||
"start": "npm run-script conv0 && npm run-script conv1 && npm run-script conv2 && npm run-script conv3 && npm run-script conv4 && npm run-script conv5 && npm run-script conv6",
|
||||
"conv0": "node conv-font.js ../main-gdxapp/assets/font/code-2000.ttf > bin/code-2000.xml",
|
||||
"conv1": "node conv-font.js ../main-gdxapp/assets/font/free-sans.ttf > bin/free-sans.xml",
|
||||
"conv2": "node conv-font.js ../main-gdxapp/assets/font/noto-sans-brahmi.ttf > bin/noto-sans-brahmi.xml",
|
||||
"conv3": "node conv-font.js ../main-gdxapp/assets/font/new-gardiner-bmp.ttf > bin/new-gardiner-bmp.xml",
|
||||
"conv4": "node conv-font.js ../main-gdxapp/assets/font/fa-solid-900.ttf > bin/fa-solid-900.xml",
|
||||
"conv5": "node conv-font.js ../main-gdxapp/assets/font/code-2001.ttf > bin/code-2001.xml",
|
||||
"conv6": "node conv-font.js ../main-gdxapp/assets/font/code-2002.ttf > bin/code-2002.xml",
|
||||
"debug": "node conv-font.js ../main-gdxapp/assets/font/free-sans.ttf"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
BIN
main-gdxapp/assets/font/code-2001.ttf
Normal file
BIN
main-gdxapp/assets/font/code-2001.ttf
Normal file
Binary file not shown.
BIN
main-gdxapp/assets/font/code-2002.ttf
Normal file
BIN
main-gdxapp/assets/font/code-2002.ttf
Normal file
Binary file not shown.
BIN
main-gdxapp/assets/font/fa-solid-900.ttf
Normal file
BIN
main-gdxapp/assets/font/fa-solid-900.ttf
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -49,13 +49,17 @@ public class ImGuiSetup {
|
|||
ImFontGlyphRangesBuilder fontBuilder = new ImFontGlyphRangesBuilder();
|
||||
addRangeUnicodePlane0(fontBuilder);
|
||||
final short[] glyphRanges = fontBuilder.buildRanges();
|
||||
|
||||
// Base font has almost everything
|
||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/code2000.ttf").readBytes(), 22, fontConfig, glyphRanges);
|
||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/code-2000.ttf").readBytes(), 22, fontConfig, glyphRanges);
|
||||
fontConfig.setMergeMode(true);
|
||||
// note: merges ~148 chars, just for 3 sub chars for SUBHEX, but still missing 2 chars from T12 alt1 clock
|
||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/free-sans.ttf").readBytes(), 22, fontConfig, glyphRanges);
|
||||
// Egyptian hieroglyphs
|
||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/new-gardiner-bmp.ttf").readBytes(), 22, fontConfig, glyphRanges);
|
||||
// Nice icons
|
||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/fa-solid-900.ttf").readBytes(), 22, fontConfig, glyphRanges);
|
||||
|
||||
fontConfig.destroy();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue