Skip to content

Commit

Permalink
Merge pull request #490 from betrusted-io/fix-default-font
Browse files Browse the repository at this point in the history
fix default font settings
  • Loading branch information
bunnie authored Jan 29, 2024
2 parents 795738a + fdf10f3 commit f008520
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions services/graphics-server/src/wordwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit f008520

Please sign in to comment.