Enable compression for ui fonts
Add --compress flag to font generation command and regenerate the font bitmap data with compression enabled. This reduces the bitmap array size while maintaining the same 2-bit mode and character intervals.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1735
-3308
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1929
-4253
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@ for size in ${UI_FONT_SIZES[@]}; do
|
||||
# partial edge coverage dithers (GfxRenderer renderCharImpl), so UI text is
|
||||
# anti-aliased on 1-bit panels and blends properly in grayscale passes.
|
||||
python fontconvert.py $font_name $size $font_path $hebrew_path $viet_path \
|
||||
--2bit --additional-intervals 0x05D0,0x05EA > $output_path
|
||||
--2bit --compress --additional-intervals 0x05D0,0x05EA > $output_path
|
||||
echo "Generated $output_path"
|
||||
done
|
||||
done
|
||||
@@ -54,7 +54,7 @@ done
|
||||
python fontconvert.py notosans_8_regular 8 \
|
||||
../builtinFonts/source/NotoSans/NotoSans-Regular.ttf \
|
||||
../builtinFonts/source/NotoSansHebrew/NotoSansHebrew-Regular.ttf \
|
||||
--2bit --additional-intervals 0x05D0,0x05EA > ../builtinFonts/notosans_8_regular.h
|
||||
--2bit --compress --additional-intervals 0x05D0,0x05EA > ../builtinFonts/notosans_8_regular.h
|
||||
|
||||
echo ""
|
||||
echo "Running compression verification..."
|
||||
|
||||
+3
-3
@@ -9,9 +9,9 @@
|
||||
#define NOTOSANS_14_FONT_ID (-1589315735)
|
||||
#define NOTOSANS_16_FONT_ID (1669013660)
|
||||
#define NOTOSANS_18_FONT_ID (37077304)
|
||||
#define UI_10_FONT_ID (-1901121527)
|
||||
#define UI_12_FONT_ID (577549789)
|
||||
#define SMALL_FONT_ID (-1925899166)
|
||||
#define UI_10_FONT_ID (418318152)
|
||||
#define UI_12_FONT_ID (-1702441159)
|
||||
#define SMALL_FONT_ID (-1846631915)
|
||||
|
||||
// Font ID 0 is reserved as the "not found" sentinel.
|
||||
// Guard against any hash accidentally producing 0.
|
||||
|
||||
Reference in New Issue
Block a user