From ee5ff3f3129bd62aa7dc35aa0555db159acfd027 Mon Sep 17 00:00:00 2001 From: june0cho Date: Tue, 12 Nov 2013 21:28:59 +0900 Subject: [PATCH] Fix the crash on #582. Combining characters are still not shown because this is not implemented. With @sonwow --- src/components/gfx/text/shaping/harfbuzz.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/gfx/text/shaping/harfbuzz.rs b/src/components/gfx/text/shaping/harfbuzz.rs index 0708ead5e2c..7ed2fb93f47 100644 --- a/src/components/gfx/text/shaping/harfbuzz.rs +++ b/src/components/gfx/text/shaping/harfbuzz.rs @@ -334,7 +334,7 @@ impl Shaper { let mut max_glyph_idx = glyph_span.end(); for i in char_byte_span.eachi() { if byteToGlyph[i] > NO_GLYPH { - max_glyph_idx = uint::max(byteToGlyph[i] as uint, max_glyph_idx); + max_glyph_idx = uint::max(byteToGlyph[i] as uint + 1, max_glyph_idx); } }