add original font files

prepare for using zlib instead of stb for compression
Unifont not included due to its size... I have plans to load it in a more size-efficient way
This commit is contained in:
tildearrow 2024-04-06 18:25:08 -05:00
parent 1e9bebede3
commit 988c11c193
11 changed files with 11 additions and 1 deletions

1
.gitignore vendored
View file

@ -34,4 +34,5 @@ res/docpdf/manual.html
res/docpdf/manual.pdf
res/docpdf/.venv
res/docpdf/htmldoc/
res/fonts/compressed/
res/furnace.appdata.xml

BIN
res/fonts/Exo-Medium.ttf Normal file

Binary file not shown.

BIN
res/fonts/FontAwesome.otf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
res/fonts/PTMono.ttf Normal file

Binary file not shown.

BIN
res/fonts/ProggyClean.ttf Normal file

Binary file not shown.

7
res/fonts/bake.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
mkdir -p compressed
for i in *.ttf *.otf; do
echo "$i"
cat "$i" | zlib-flate -compress=9 > compressed/"$i".zl
done

Binary file not shown.

View file

@ -5704,7 +5704,9 @@ void FurnaceGUI::applyUISettings(bool updateFonts) {
// two fallback fonts
mainFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(font_liberationSans_compressed_data,font_liberationSans_compressed_size,MAX(1,e->getConfInt("mainFontSize",18)*dpiScale),&fc1,fontRange);
mainFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(font_unifont_compressed_data,font_unifont_compressed_size,MAX(1,e->getConfInt("mainFontSize",18)*dpiScale),&fc1,fontRange);
if (settings.loadJapanese || settings.loadChinese || settings.loadChineseTraditional || settings.loadKorean) {
mainFont=ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(font_unifont_compressed_data,font_unifont_compressed_size,MAX(1,e->getConfInt("mainFontSize",18)*dpiScale),&fc1,fontRange);
}
ImFontConfig fc;
fc.MergeMode=true;