From 641585515cc126d6f059e21a333783f8da0ca600 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Mon, 14 Dec 2009 15:48:00 -0800 Subject: [PATCH] Pango: Really fix the check for zero-width chars. The value of 0x0FFFFFFF is assigned to a PangoGlyph if the current character has zero width, so skip the glyph lookup stage for these characters. Note that 0xFFFFFFFF is used for invalid characters, so the error messages for these cases are accurate. --- lily/pango-font.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lily/pango-font.cc b/lily/pango-font.cc index f4a4922f24..1275e91dfb 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -172,6 +172,13 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item, PangoGlyph pg = pgi->glyph; PangoGlyphGeometry ggeo = pgi->geometry; + /* + Zero-width characters are valid Unicode characters, + but glyph lookups need to be skipped. + */ + if (!(pg ^ PANGO_GLYPH_EMPTY)) + continue; + glyph_name[0] = '\0'; if (has_glyph_names) { -- 2.39.2