From fe51ad2e7c25f1291995ab3c18595d19a7420e11 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 30 Aug 2020 15:32:52 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20different-fonts-in-text=20bug=20=E2=9C=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/text.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/text.rs b/src/layout/text.rs index b95110b73..c1f1f1e7c 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -110,7 +110,7 @@ impl<'a> TextLayouter<'a> { self.shaped.text.push(c); self.shaped.glyphs.push(glyph); - self.shaped.offsets.push(self.width); + self.shaped.offsets.push(self.width - self.start); self.width += char_width; }