From 39fb11457fc418d5f4f6ca567df3aa6b1af42216 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 29 Jan 2024 03:37:25 +0800 Subject: [PATCH] cjk is not in the small font set, substitute Tall for that target --- services/graphics-server/src/wordwrap.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/graphics-server/src/wordwrap.rs b/services/graphics-server/src/wordwrap.rs index dedcd0687..b3bb80089 100644 --- a/services/graphics-server/src/wordwrap.rs +++ b/services/graphics-server/src/wordwrap.rs @@ -234,8 +234,14 @@ impl Typesetter { space.kern = 0; let mut ellipsis = style_glyph('…', base_style); ellipsis.kern = 0; - let mut large_space = style_glyph(' ', &GlyphStyle::Cjk); - large_space.wide = glyph_to_height_hint(GlyphStyle::Cjk) as u8; + + #[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(' ', &base_style); + large_space.wide = glyph_to_height_hint(base_style) as u8; Typesetter { charpos: 0, cursor: Cursor::new(0, 0, 0),