restrict font choices in baosec target

we have a smaller font map, so don't resolve glyphs to fonts
that we don't have.
This commit is contained in:
bunnie 2025-02-28 16:32:03 +08:00
parent dde034c101
commit 8f48572b9c

View file

@ -121,6 +121,7 @@ macro_rules! en_audio_rules {
}
#[macro_export]
#[cfg(not(any(feature = "board-baosec", feature = "hosted-baosec")))]
macro_rules! english_rules {
($base_style:expr, $emoji_style:expr, $ch:ident) => {
match $base_style($ch) {
@ -145,6 +146,24 @@ macro_rules! english_rules {
};
}
#[macro_export]
// Reflect reduced font space on small-memory footprint devices
#[cfg(any(feature = "board-baosec", feature = "hosted-baosec"))]
macro_rules! english_rules {
($base_style:expr, $emoji_style:expr, $ch:ident) => {
match $base_style($ch) {
Ok(g) => g,
_ => match $emoji_style($ch) {
Ok(g) => g,
_ => match $base_style(REPLACEMENT) {
Ok(g) => g,
_ => NULL_GLYPH_SPRITE,
},
},
}
};
}
pub use en_audio_rules;
pub use english_rules;
pub use jp_rules;