Merge pull request #490 from betrusted-io/fix-default-font

fix default font settings
This commit is contained in:
bunnie 2024-01-30 00:05:11 +08:00 committed by GitHub
commit f008520f06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -235,13 +235,17 @@ impl Typesetter {
let mut ellipsis = style_glyph('…', base_style);
ellipsis.kern = 0;
#[cfg(feature = "cramium-soc")]
let base_style = GlyphStyle::Tall;
#[cfg(not(feature = "cramium-soc"))]
let base_style = GlyphStyle::Cjk;
let mut large_space = style_glyph(' ', &GlyphStyle::Cjk);
#[cfg(feature = "cramium-soc")]
let mut large_space = style_glyph(' ', &GlyphStyle::Tall);
if cfg!(feature = "cramium-soc") {
large_space.wide = glyph_to_height_hint(GlyphStyle::Tall) as u8;
} else {
large_space.wide = glyph_to_height_hint(GlyphStyle::Cjk) as u8;
}
let mut large_space = style_glyph(' ', &base_style);
large_space.wide = glyph_to_height_hint(base_style) as u8;
Typesetter {
charpos: 0,
cursor: Cursor::new(0, 0, 0),