Remove legacy fonts and make the bootloader compile with LVGL

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 0404919667
commit ee0c37157d
74 changed files with 2027 additions and 775 deletions
-45
View File
@@ -1,48 +1,3 @@
string(TOLOWER ${TRANSLATIONS} subset)
#
# libopenui fonts
#
if( (${subset} STREQUAL "cn") OR (${subset} STREQUAL "tw"))
# Use this font for CJK languages
set(FONT "Noto/NotoSansCJKsc-Regular")
set(FONT_BOLD "Noto/NotoSansCJKsc-Bold")
set(FONT_OFFSET -3)
else()
# Use this font for non-CJK languages
set(FONT "Roboto/Roboto-Regular")
set(FONT_BOLD "Roboto/Roboto-Bold")
set(FONT_OFFSET 0)
#set(FONT "Kanit/Kanit-Regular")
#set(FONT_BOLD "Kanit/Kanit-Bold")
#set(FONT "Ubuntu/Ubuntu-Regular")
#set(FONT_BOLD "Ubuntu/Ubuntu-Bold")
endif()
add_truetype_font_target(9 9 ${subset} none "${FONT_ARGS}")
add_truetype_font_target(13 13 ${subset} none "${FONT_ARGS}")
add_truetype_font_target(15 15 ${subset} none "${FONT_ARGS}")
add_truetype_font_target(16 16 ${subset} none "${FONT_ARGS}")
add_truetype_font_target(16en 16 en none "${FONT_ARGS}")
add_truetype_font_target(bold16 16 ${subset} bold "${FONT_ARGS}")
add_truetype_font_target(17 17 ${subset} none "${FONT_ARGS}")
add_truetype_font_target(17en 17 en none "${FONT_ARGS}")
add_truetype_font_target(bold17 17 ${subset} bold "${FONT_ARGS}")
add_truetype_font_target(24 24 ${subset} none "${FONT_ARGS}")
if(${subset} STREQUAL "cn")
add_truetype_font_target(32 30 ${subset} bold "${FONT_ARGS}")
elseif(${subset} STREQUAL "tw")
add_truetype_font_target(32 24 ${subset} bold "${FONT_ARGS}")
else()
add_truetype_font_target(32 32 ${subset} bold "${FONT_ARGS}")
endif()
add_truetype_font_target(64 64 en bold "${FONT_ARGS}")
add_custom_target(truetype_fonts DEPENDS ${truetype_fonts_targets})
#
# LVGL fonts
#
File diff suppressed because it is too large Load Diff
+14
View File
@@ -25,6 +25,19 @@ function make_font() {
--format lvgl -o lv_font_${name}_${size}.c --force-fast-kern-format
}
# LV_SYMBOL_CHARGE, LV_SYMBOL_NEW_LINE, LV_SYMBOL_SD_CARD, LV_SYMBOL_CLOSE
BL_SYMBOLS="61671,63650,63426,61453"
function make_bootloader_font() {
local name=$1
local ttf=$2
local size=$3
lv_font_conv --no-prefilter --bpp 4 --size ${size} \
--font ${TTF_DIR}${ttf} -r ${ASCII} \
--font ${SYMBOLS_FONT} -r ${BL_SYMBOLS} \
--format lvgl -o lv_font_${name}_${size}.c --force-fast-kern-format
}
make_font "roboto" "Roboto/Roboto-Regular.ttf" 9
make_font "roboto" "Roboto/Roboto-Regular.ttf" 13
make_font "roboto" "Roboto/Roboto-Regular.ttf" 14
@@ -38,4 +51,5 @@ make_font "roboto_bold" "Roboto/Roboto-Bold.ttf" 17
make_font "roboto_bold" "Roboto/Roboto-Bold.ttf" 16
make_font "roboto_bold" "Roboto/Roboto-Bold.ttf" 32
make_font "roboto_bold" "Roboto/Roboto-Bold.ttf" 64
make_bootloader_font "roboto_bl" "Roboto/Roboto-Regular.ttf" 16