kopia lustrzana https://github.com/pimoroni/pimoroni-pico
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
rodzic
12b4e79cb6
commit
264f9f76cd
|
@ -28,12 +28,17 @@ namespace hershey {
|
|||
}
|
||||
|
||||
const font_t* font(std::string_view font) {
|
||||
#ifdef PG_HERSHEY_LITE
|
||||
if(font == "serif") return ×r;
|
||||
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 ×i;
|
||||
else if(font == "serif") return ×r;
|
||||
return &futural;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline float deg2rad(float degrees) {
|
||||
|
|
|
@ -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()
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue