Merge pull request #20281 from NABN00B/atlas-symbols

Add handpicked symbols group to atlastool
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2025-07-10 22:43:36 +02:00
commit f44b4e31e6
10 files changed
+67 -48

No files matched your search

+1
View File
@@ -1193,6 +1193,7 @@
<None Include="..\b.sh" />
<None Include="..\build.gradle" />
<None Include="..\buildatlas.sh" />
<None Include="..\build_fontatlas.sh" />
<None Include="..\build_ppgeatlas.sh" />
<None Include="..\CMakeLists.txt" />
<None Include="..\cmake\Modules\ccache.cmake" />
+3
View File
@@ -607,6 +607,9 @@
<None Include="..\b.sh">
<Filter>Build</Filter>
</None>
<None Include="..\build_fontatlas.sh">
<Filter>Build</Filter>
</None>
<None Include="..\build_ppgeatlas.sh">
<Filter>Build</Filter>
</None>
+1 -1
View File
@@ -1,2 +1,2 @@
2048
font UBUNTU24 assets/Roboto-Condensed.ttf UWER 34 -2
font UBUNTU24 assets/Roboto-Condensed.ttf UWERS 34 -2
+2
View File
@@ -0,0 +1,2 @@
./ext/native/tools/build/atlastool font_atlasscript.txt font 8888 && mv font_atlas.zim font_atlas.meta assets && rm font_atlas.cpp font_atlas.h
./ext/native/tools/build/atlastool asciifont_atlasscript.txt asciifont 8888 && mv asciifont_atlas.zim asciifont_atlas.meta assets && rm asciifont_atlas.cpp asciifont_atlas.h
+1 -1
View File
@@ -1 +1 @@
./ext/native/tools/build/atlastool ppge_atlasscript.txt ppge && rm ppge_atlas.cpp ppge_atlas.h && cp ppge_atlas.zim assets && cp ppge_atlas.meta assets && mv ppge_atlas.zim ppge_atlas.meta android/assets
./ext/native/tools/build/atlastool ppge_atlasscript.txt ppge && rm ppge_atlas.cpp ppge_atlas.h && mv ppge_atlas.zim ppge_atlas.meta assets
+1 -9
View File
@@ -1,9 +1 @@
# Note that we do not copy the big font atlas to Android assets. No longer needed!
./ext/native/tools/build/atlastool ui_atlasscript.txt ui 8888 && cp ui_atlas.zim ui_atlas.meta assets && rm ui_atlas.cpp ui_atlas.h
#./ext/native/tools/build/atlastool font_atlasscript.txt font 8888 && cp font_atlas.zim font_atlas.meta assets && rm font_atlas.cpp font_atlas.h
#./ext/native/tools/build/atlastool asciifont_atlasscript.txt asciifont 8888 && cp asciifont_atlas.zim asciifont_atlas.meta assets && rm asciifont_atlas.cpp asciifont_atlas.h
rm ui_atlas.zim ui_atlas.meta
#rm font_atlas.zim font_atlas.meta
#rm asciifont_atlas.zim asciifont_atlas.meta
./ext/native/tools/build/atlastool ui_atlasscript.txt ui 8888 && mv ui_atlas.zim ui_atlas.meta assets && rm ui_atlas.cpp ui_atlas.h
+10 -8
View File
@@ -35,19 +35,21 @@ example one line in one of out configuration files is:
<glyphregions> defines which glyphs should be copied into the atlas, can use any combination
of the following:
U - US ASCII
W - Latin-1 extras 1
E - Latin-1 Extended A (needed for Hungarian etc)
e - Latin-1 Extended B (for some African and latinized asian languages?)
U - Basic Latin (US ASCII)
W - Latin-1 Supplement
E - Latin Extended-A (various European languages, Slavic, Hungarian, Romanian, Turkish, etc.)
e - Latin Extended-B (additions for European languages, some Romanized African and Asian languages)
G - Greek and Coptic
R - Cyrillic (Russian, Bulgarian, etc.)
H - Hebrew
S - Select symbols
k - Katakana
h - Hiragana
s - ShiftJIS symbols
H - Hebrew
G - Greek
R - Russian
J - Shift JIS (for Japanese fonts)
c - All Kanji, filtered though!
T - Thai
K - Korean (hangul)
V - Vietnamese (needs 'e' too)
<height> height in pixels of the glyphs in the font atlas
+44 -25
View File
@@ -801,49 +801,68 @@ void GetLocales(const char *locales, std::vector<CharRange> &ranges)
for (size_t i = 0; i < strlen(locales); i++) {
switch (locales[i]) {
case 'U': // US ASCII
ranges.push_back(range(32, 127));
case 'U': // Basic Latin (US ASCII)
ranges.push_back(range(0x20, 0x7E)); // 00 - 1F are C0 Controls, 7F is DEL
break;
case 'W': // Latin-1 extras 1
ranges.push_back(range(0x80, 0x80)); // euro sign (??? It's not here?)
ranges.push_back(range(0xA2, 0xFF)); // 80 - A0 appears to contain nothing interesting
ranges.push_back(range(0x2121, 0x2122)); // TEL symbol and trademark symbol
case 'W': // Latin-1 Supplement
ranges.push_back(range(0xA0, 0xFF)); // 80 - 9F are C1 Controls
break;
case 'E': // Latin-1 Extended A (needed for Hungarian etc)
case 'E': // Latin Extended-A (various European languages, Slavic, Hungarian, Romanian, Turkish, etc.)
ranges.push_back(range(0x100, 0x17F));
break;
case 'e': // Latin-1 Extended B (for some African and latinized asian languages?)
ranges.push_back(range(0x180, 0x250));
case 'e': // Latin Extended-B (additions for European languages, some Romanized African and Asian languages)
ranges.push_back(range(0x180, 0x24F));
break;
case 'G': // Greek and Coptic
ranges.push_back(range(0x0370, 0x03FF));
break;
case 'R': // Cyrillic (Russian, Bulgarian, etc.)
ranges.push_back(range(0x0400, 0x04FF));
break;
case 'H': // Hebrew
ranges.push_back(range(0x0590, 0x05FF));
break;
case 'S': // Select symbols
ranges.push_back(range(0x2007, 0x2007)); // Figure Space (digit-wide)
ranges.push_back(range(0x2020, 0x2021)); // Dagger and Double Dagger
ranges.push_back(range(0x20AC, 0x20AC)); // Euro sign
ranges.push_back(range(0x2116, 0x2116)); // "No." symbol
ranges.push_back(range(0x2120, 0x2122)); // "SM", "TEL" and "TM" symbols
ranges.push_back(range(0x2139, 0x2139)); // "i" symbol
ranges.push_back(range(0x2300, 0x2300)); // Diameter sign
ranges.push_back(range(0x2302, 0x2302)); // House sign
// ranges.push_back(range(0x2314, 0x2314)); // Place of Interest sign
// ranges.push_back(range(0x2328, 0x2328)); // Keyboard sign
// ranges.push_back(range(0x232B, 0x232B)); // Backspace symbol
// ranges.push_back(range(0x23CE, 0x23CF)); // Return and Eject symbols
// ranges.push_back(range(0x23E9, 0x23EF)); // UI and Media Control symbols 1
// ranges.push_back(range(0x23F4, 0x23FA)); // UI and Media Control symbols 2
ranges.push_back(range(0x2610, 0x2612)); // Ballot boxes
ranges.push_back(range(0x26A0, 0x26A1)); // Warning and High Voltage signs
ranges.push_back(range(0x32CF, 0x32CF)); // "LTD" symbol
ranges.push_back(range(0x33C7, 0x33C7)); // "Co." symbol
ranges.push_back(range(0x33CD, 0x33CD)); // "K.K." symbol
ranges.push_back(range(0xFFFD, 0xFFFD)); // "?" Replacement character
break;
case 'k': // Katakana
ranges.push_back(range(0x30A0, 0x30FF));
ranges.push_back(range(0x31F0, 0x31FF));
ranges.push_back(range(0xFF00, 0xFFEF)); // half-width ascii
ranges.push_back(range(0xFF00, 0xFFEF)); // Halfwidth ascii
break;
case 'h': // Hiragana
ranges.push_back(range(0x3041, 0x3097));
ranges.push_back(range(0x3099, 0x309F));
break;
case 's': // ShiftJIS symbols
case 'J': // Shift JIS (for Japanese fonts)
ranges.push_back(range(0x2010, 0x2312)); // General Punctuation, Letterlike Symbols, Arrows,
// Mathematical Operators, Miscellaneous Technical
ranges.push_back(range(0x2500, 0x254B)); // Box drawing
ranges.push_back(range(0x25A0, 0x266F)); // Geometric Shapes, Miscellaneous Symbols
ranges.push_back(range(0x3231, 0x3231)); // Co,.Ltd. symbol
ranges.push_back(range(0x2116, 0x2116)); // "No." symbol
ranges.push_back(range(0x33CD, 0x33CD)); // "K.K." symbol
break;
case 'H': // Hebrew
ranges.push_back(range(0x0590, 0x05FF));
break;
case 'G': // Greek
ranges.push_back(range(0x0370, 0x03FF));
break;
case 'R': // Russian
ranges.push_back(range(0x0400, 0x04FF));
ranges.push_back(range(0x25A0, 0x266F)); // Geometric Shapes, Miscellaneous Symbols
break;
case 'c': // All Kanji, filtered though!
ranges.push_back(range(0x3000, 0x303f)); // Ideographic symbols
ranges.push_back(range(0x3000, 0x303F)); // Ideographic symbols
ranges.push_back(range(0x4E00, 0x9FFF, kanji));
// ranges.push_back(range(0xFB00, 0xFAFF, kanji));
break;
+2 -2
View File
@@ -1,3 +1,3 @@
2048
font UBUNTU24 assets/Roboto-Condensed.ttf UWER 34 -2
font UBUNTU24 C:/Windows/Fonts/ARIALUNI.ttf UWEhkcRGHKVTe 30 0
font UBUNTU24 assets/Roboto-Condensed.ttf UWERS 34 -2
font UBUNTU24 C:/Windows/Fonts/ARIALUNI.ttf UWEhkcRGHKVTeS 30 0
+2 -2
View File
@@ -1,6 +1,6 @@
2048
font UBUNTU24 C:/Windows/Fonts/KozGoPro-Medium.otf UWkhcsGR 24
font UBUNTU24 C:/Windows/Fonts/ARIALUNI.ttf UWEhkcRGHKVTe 24 0
font UBUNTU24 C:/Windows/Fonts/KozGoPro-Medium.otf UWkhcJGRS 24
font UBUNTU24 C:/Windows/Fonts/ARIALUNI.ttf UWEhkcRGHKVTeS 24 0
image I_CROSS source_assets/image/cross.png copy
image I_CIRCLE source_assets/image/circle.png copy
image I_SQUARE source_assets/image/square.png copy