]> git.donarmstrong.com Git - lilypond.git/commitdiff
Pango: Really fix the check for zero-width chars.
authorPatrick McCarty <pnorcks@gmail.com>
Mon, 14 Dec 2009 23:48:00 +0000 (15:48 -0800)
committerPatrick McCarty <pnorcks@gmail.com>
Tue, 15 Dec 2009 01:00:03 +0000 (17:00 -0800)
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

index f4a4922f240d7e98c224d31e5eb4979430cc85e1..1275e91dfb50459b6b6030da7df19d9d30545d65 100644 (file)
@@ -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)
        {