Unicorn(s): Remove some Hershey fonts.

Since Hershey fonts make virtually no sense on these low-resolution displays, remove
all but Serif/Sans to make up for the additional flash usage of MicroPython 1.24.0 /
Pico SDK 2.0.0.
pull/1025/head
Phil Howard 2024-10-24 11:51:10 +01:00
rodzic 12b4e79cb6
commit 264f9f76cd
5 zmienionych plików z 21 dodań i 1 usunięć

Wyświetl plik

@ -28,12 +28,17 @@ namespace hershey {
}
const font_t* font(std::string_view font) {
#ifdef PG_HERSHEY_LITE
if(font == "serif") return &timesr;
return &futural;
#else
if(font == "sans") return &futural;
else if(font == "gothic") return &gothgbt;
else if(font == "cursive") return &scripts;
else if(font == "serif_italic") return &timesi;
else if(font == "serif") return &timesr;
return &futural;
#endif
}
inline float deg2rad(float degrees) {

Wyświetl plik

@ -12,4 +12,10 @@ target_include_directories(usermod_${MOD_NAME} INTERFACE
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/hershey_fonts
)
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})
target_link_libraries(usermod INTERFACE usermod_${MOD_NAME})
function(hershey_lite)
target_compile_definitions(usermod_${MOD_NAME} INTERFACE
PG_HERSHEY_LITE=1
)
endfunction()

Wyświetl plik

@ -13,6 +13,9 @@ include(pimoroni_bus/micropython)
# Pico Graphics Essential
include(hershey_fonts/micropython)
# We need to save ~3k somewhere,
# and Hershey fonts don't make sense on these boards
hershey_lite()
include(bitmap_fonts/micropython)
include(picographics/micropython)

Wyświetl plik

@ -13,6 +13,9 @@ include(pimoroni_bus/micropython)
# Pico Graphics Essential
include(hershey_fonts/micropython)
# We need to save ~3k somewhere,
# and Hershey fonts don't make sense on these boards
hershey_lite()
include(bitmap_fonts/micropython)
include(picographics/micropython)

Wyświetl plik

@ -13,6 +13,9 @@ include(pimoroni_bus/micropython)
# Pico Graphics Essential
include(hershey_fonts/micropython)
# We need to save ~3k somewhere,
# and Hershey fonts don't make sense on these boards
hershey_lite()
include(bitmap_fonts/micropython)
include(picographics/micropython)