chore(color): Reduce font FLASH storage (#3881)

This commit is contained in:
philmoz
2023-10-29 11:29:14 +10:00
committed by GitHub
parent b0267573b0
commit 58573d3315
68 changed files with 45290 additions and 328155 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
+68 -19
View File
@@ -39,10 +39,11 @@ function make_font() {
local name=$1
local ttf=$2
local size=$3
local chars=$4
local arg=$5
local bpp=$4
local chars=$5
local arg=$6
lv_font_conv --no-prefilter --bpp 4 --size ${size} \
lv_font_conv --no-prefilter --bpp ${bpp} --size ${size} \
--font ${TTF_DIR}${ttf} -r ${ASCII},${DEGREE},${BULLET},${COMPARE}${chars} \
--font EdgeTX/extra.ttf -r ${EXTRA_SYM} \
--font ${ARROWS_FONT} -r ${ARROWS} \
@@ -50,29 +51,76 @@ function make_font() {
--format lvgl -o lv_font_${name}_${size}.c --force-fast-kern-format ${arg}
}
function make_font_bin() {
local name=$1
local ttf=$2
local size=$3
local bpp=$4
local chars=$5
local arg=$6
lv_font_conv --no-prefilter --bpp ${bpp} --size ${size} \
--font ${TTF_DIR}${ttf} -r ${ASCII},${DEGREE},${BULLET},${COMPARE}${chars} \
--font EdgeTX/extra.ttf -r ${EXTRA_SYM} \
--font ${ARROWS_FONT} -r ${ARROWS} \
--font ${SYMBOLS_FONT} -r ${SYMBOLS} \
--format bin -o lv_font_${name}_${size}.bin --force-fast-kern-format --no-compress ${arg}
}
function make_font_w_extra_sym() {
local name=$1
local ttf=$2
local size=$3
local chars=$4
local arg=$5
lv_font_conv --no-prefilter --bpp 4 --size ${size} \
local bpp=$4
local chars=$5
local arg=$6
lv_font_conv --no-prefilter --bpp ${bpp} --size ${size} \
--font ${TTF_DIR}${ttf} -r ${ASCII},${DEGREE}${chars} \
--font EdgeTX/extra.ttf -r ${EXTRA_SYM} \
--format lvgl -o lv_font_${name}_${size}.c --force-fast-kern-format ${arg}
}
function make_font_w_extra_sym_bin() {
local name=$1
local ttf=$2
local size=$3
local bpp=$4
local chars=$5
local arg=$6
lv_font_conv --no-prefilter --bpp ${bpp} --size ${size} \
--font ${TTF_DIR}${ttf} -r ${ASCII},${DEGREE}${chars} \
--font EdgeTX/extra.ttf -r ${EXTRA_SYM} \
--format bin -o lv_font_${name}_${size}.bin --force-fast-kern-format --no-compress ${arg}
}
function make_font_no_sym() {
local name=$1
local ttf=$2
local size=$3
local chars=$4
local arg=$5
lv_font_conv --no-prefilter --bpp 4 --size ${size} \
local bpp=$4
local chars=$5
local arg=$6
lv_font_conv --no-prefilter --bpp ${bpp} --size ${size} \
--font ${TTF_DIR}${ttf} -r ${ASCII},${DEGREE}${chars} \
--format lvgl -o lv_font_${name}_${size}.c --force-fast-kern-format ${arg}
}
function make_font_no_sym_bin() {
local name=$1
local ttf=$2
local size=$3
local bpp=$4
local chars=$5
local arg=$6
lv_font_conv --no-prefilter --bpp ${bpp} --size ${size} \
--font ${TTF_DIR}${ttf} -r ${ASCII},${DEGREE}${chars} \
--format bin -o lv_font_${name}_${size}.bin --force-fast-kern-format --no-compress ${arg}
}
# LV_SYMBOL_CHARGE, LV_SYMBOL_NEW_LINE, LV_SYMBOL_SD_CARD, LV_SYMBOL_CLOSE
# LV_SYMBOL_FILE, LV_SYMBOL_OK, LV_SYMBOL_WIFI
BL_SYMBOLS="61671,63650,63426,61453,61787,61452,61931"
@@ -93,15 +141,16 @@ function make_font_set() {
local ttf_bold=$3
local chars=$4
make_font "${name}" "${ttf_normal}" 9 ${chars} --no-compress
make_font "${name}" "${ttf_normal}" 13 ${chars} --no-compress
make_font "${name}" "${ttf_normal}" 16 ${chars} --no-compress
make_font "${name}" "${ttf_normal}" 17 ${chars} --no-compress
make_font "${name}_bold" "${ttf_bold}" 16 ${chars}
make_font "${name}_bold" "${ttf_bold}" 17 ${chars}
make_font_w_extra_sym "${name}" "${ttf_normal}" 24 ${chars}
make_font_no_sym "${name}_bold" "${ttf_bold}" 32 ${chars}
make_font_no_sym "${name}_bold" "${ttf_bold}" 64
make_font "${name}" "${ttf_normal}" 9 4 ${chars} --no-compress
make_font "${name}" "${ttf_normal}" 13 4 ${chars} --no-compress
make_font "${name}" "${ttf_normal}" 16 4 ${chars} --no-compress
make_font "${name}_bold" "${ttf_bold}" 16 4 ${chars} --no-compress
# make_font_w_extra_sym "${name}" "${ttf_normal}" 24 2 ${chars}
# make_font_no_sym "${name}_bold" "${ttf_bold}" 32 2 ${chars}
# make_font_no_sym "${name}_bold" "${ttf_bold}" 64 2
make_font_bin "${name}" "${ttf_normal}" 24 4 ${chars}
make_font_bin "${name}_bold" "${ttf_bold}" 32 4 ${chars}
make_font_bin "${name}_bold" "${ttf_bold}" 64 4 ${chars}
}
# Regular fonts
@@ -115,4 +164,4 @@ make_font_set "noto_tw" "Noto/NotoSansCJKsc-Regular.otf" "Noto/NotoSansCJKsc-Bol
make_font_set "noto_cn" "Noto/NotoSansCJKsc-Regular.otf" "Noto/NotoSansCJKsc-Bold.otf" ",${CN_SYMBOLS}"
make_font_set "noto_jp" "Noto/NotoSansCJKsc-Regular.otf" "Noto/NotoSansCJKsc-Bold.otf" ",${JP_SYMBOLS}"
make_font_set "arimo_he" "Arimo/Arimo-Regular.ttf" "Arimo/Arimo-Bold.ttf" ",${HE_SYMBOLS}"
make_font_set "Arimo_ru" "Arimo/Arimo-Regular.ttf" "Arimo/Arimo-Bold.ttf" ",${RU_SYMBOLS}"
make_font_set "arimo_ru" "Arimo/Arimo-Regular.ttf" "Arimo/Arimo-Bold.ttf" ",${RU_SYMBOLS}"