From 6c8b5caa9fa731f16b2d9d232177c00de8f2b74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurenz=20M=C3=A4dje?= Date: Sat, 27 Jul 2019 20:21:44 +0200 Subject: =?UTF-8?q?Improve=20subsetter=20testing=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(-) (limited to 'src/layout') diff --git a/src/layout/text.rs b/src/layout/text.rs index 75a59254..6aa5ef71 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -32,7 +32,7 @@ pub fn layout(text: &str, ctx: TextContext) -> LayoutResult { }).ok_or_else(|| LayoutError::NoSuitableFont(character))?; // Add the char width to the total box width. - let char_width = font.widths[font.map(character) as usize] * ctx.style.font_size; + let char_width = font.widths[font.encode(character) as usize] * ctx.style.font_size; width += char_width; // Change the font if necessary. -- cgit v1.2.3