From 7b8b63adc5e0389fc4cf2720ef7e5804ab6c29cc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 22 Jul 2015 15:24:26 +0100 Subject: [PATCH] [ot] Don't mirror character if font doesn't support mirrored character! --- src/hb-ot-shape.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index a531d7706..8d6bb3d53 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -305,7 +305,7 @@ hb_ot_mirror_chars (hb_ot_shape_context_t *c) hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) { hb_codepoint_t codepoint = unicode->mirroring (info[i].codepoint); - if (likely (codepoint == info[i].codepoint)) + if (likely (codepoint == info[i].codepoint || !c->font->has_glyph (codepoint))) info[i].mask |= rtlm_mask; else info[i].codepoint = codepoint;