You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of #4536, (and #4536 (comment)) we moved from enum Font to type Font = &'static FontInfo. For convenience, in the older enum approach, some fonts were mapped to the same enum variant during build, e.g. for TS3 (Caesar UI):
there were less fonts for bootloader (to preserve flash size)
using hardcoded font in components was possible, e.g.
let font = Font::FONT_BIG;// using Font_Unifont_Regular_16 in Firmware but Font_PixelOperator_Regular_8 in Bootloader
In order to preserve the code without too much refactoring a crutch was made in this manner in #4536:
// same for both FW and BLpubconstFONT_NORMAL:crate::ui::display::Font = &Font_PixelOperator_Regular_8_info;#[cfg(feature = "bootloader")]pubconstFONT_BIG:crate::ui::display::Font = FONT_NORMAL;#[cfg(not(feature = "bootloader"))]pubconstFONT_BIG:crate::ui::display::Font = &Font_Unifont_Regular_16_info;
This task is to improve it so that:
bootloader code only uses the fonts it's supposed to have (others might be feature-gated),
components which use specific Font rather take it as a parameter,
(optionally) theme/mod.rs is split into theme/mod.rs (common) and theme/firmware.rs.
The text was updated successfully, but these errors were encountered:
As of #4536, (and #4536 (comment)) we moved from
enum Font
totype Font = &'static FontInfo
. For convenience, in the olderenum
approach, some fonts were mapped to the same enum variant during build, e.g. for TS3 (Caesar UI):This was done so that:
In order to preserve the code without too much refactoring a crutch was made in this manner in #4536:
This task is to improve it so that:
Font
rather take it as a parameter,theme/mod.rs
is split intotheme/mod.rs
(common) andtheme/firmware.rs
.The text was updated successfully, but these errors were encountered: