From: Patrick McCarty Date: Mon, 14 Dec 2009 23:48:00 +0000 (-0800) Subject: Pango: Really fix the check for zero-width chars. X-Git-Tag: release/2.13.10-1~178 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=641585515cc126d6f059e21a333783f8da0ca600;p=lilypond.git 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. --- 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) {