Bring normalization algorithm closer to the spec
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 7 Apr 2012 18:51:17 +0000 (14:51 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 7 Apr 2012 18:51:17 +0000 (14:51 -0400)
No logical difference so far.

src/hb-ot-shape-normalize.cc

index f24fb32..02a90bf 100644 (file)
@@ -250,7 +250,8 @@ _hb_ot_shape_normalize (hb_font_t *font, hb_buffer_t *buffer,
     }
 
     hb_codepoint_t composed, glyph;
-    if ((buffer->out_info[buffer->out_len - 1].combining_class() < buffer->info[buffer->idx].combining_class()) &&
+    if ((starter == buffer->out_len - 1 ||
+        buffer->out_info[buffer->out_len - 1].combining_class() < buffer->info[buffer->idx].combining_class()) &&
        hb_unicode_compose (buffer->unicode,
                            buffer->out_info[starter].codepoint,
                            buffer->info[buffer->idx].codepoint,