diff options
| author | Laurenz Mädje <laurmaedje@gmail.com> | 2019-07-27 20:21:44 +0200 |
|---|---|---|
| committer | Laurenz Mädje <laurmaedje@gmail.com> | 2019-07-27 21:15:10 +0200 |
| commit | 6c8b5caa9fa731f16b2d9d232177c00de8f2b74b (patch) | |
| tree | 6d35227dc307a1c7c7344f8ca290a0784e6c4b8b /src/layout | |
| parent | 7eec0b8dd70446803c9ffb84a253ebb7e68f3567 (diff) | |
Improve subsetter testing ✔
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/text.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<BoxLayout> { }).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. |
