From 17fb590d9ae78ab80f3d0af2df3f843759741855 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 5 Jul 2023 15:38:49 +0800 Subject: [PATCH] fix typsetter overflow check got the axes inverted. oops. --- services/graphics-server/src/wordwrap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/graphics-server/src/wordwrap.rs b/services/graphics-server/src/wordwrap.rs index 60783c98d..0a5ffe808 100644 --- a/services/graphics-server/src/wordwrap.rs +++ b/services/graphics-server/src/wordwrap.rs @@ -269,7 +269,7 @@ impl Typesetter { // going out of scope at the end of the call. let mut composition = Vec::::new(); - if self.bb.max.y - self.bb.min.y < glyph_to_height_hint(GlyphStyle::Regular) as i16 { + if self.bb.max.x - self.bb.min.x < glyph_to_height_hint(GlyphStyle::Regular) as i16 { // we flag this because the typesetter algorithm may never converge if it can't set any characters // because the region is just too narrow. log::error!("Words cannot be typset because the width of the typset region is too narrow.");