[HarfBuzz] harfbuzz-ng: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Apr 11 11:40:00 PDT 2012


 src/hb-ot-shape-complex-arabic.cc |    9 ++++++---
 src/hb-ot-shape-complex-misc.cc   |    7 ++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 4a1e02ef7979d58fe0c726ee7c665b2420c42ddd
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Apr 11 14:37:53 2012 -0400

    Fix shape to presentation forms font check
    
    As reported by Jonathan Kew on the list.

diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc
index 4b6f54d..a56d161 100644
--- a/src/hb-ot-shape-complex-arabic.cc
+++ b/src/hb-ot-shape-complex-arabic.cc
@@ -211,9 +211,12 @@ arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer)
   hb_codepoint_t glyph;
 
   /* Shape to presentation forms */
-  for (unsigned int i = 0; i < count; i++)
-    if (hb_font_get_glyph (font, buffer->info[i].codepoint, 0, &glyph))
-      buffer->info[i].codepoint = get_arabic_shape (buffer->info[i].codepoint, buffer->info[i].arabic_shaping_action());
+  for (unsigned int i = 0; i < count; i++) {
+    hb_codepoint_t u = buffer->info[i].codepoint;
+    hb_codepoint_t shaped = get_arabic_shape (u, buffer->info[i].arabic_shaping_action());
+    if (shaped != u && hb_font_get_glyph (font, shaped, 0, &glyph))
+      buffer->info[i].codepoint = shaped;
+  }
 
   /* Mandatory ligatures */
   buffer->clear_output ();
commit 6062f5f01436b4044be729890ed00b9b62737824
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Apr 11 14:19:55 2012 -0400

    Fix build with some compilers
    
    As reported by Jonathan Kew on the list.

diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc
index 5880e32..99e54f6 100644
--- a/src/hb-ot-shape-complex-misc.cc
+++ b/src/hb-ot-shape-complex-misc.cc
@@ -132,14 +132,15 @@ _hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map, hb_buffer_t *buffer, hb
   unsigned int count = buffer->len;
   for (buffer->idx = 0; buffer->idx < count;)
   {
-    if (likely (!IS_SARA_AM (buffer->info[buffer->idx].codepoint))) {
+    hb_codepoint_t u = buffer->info[buffer->idx].codepoint;
+    if (likely (!IS_SARA_AM (u))) {
       buffer->next_glyph ();
       continue;
     }
 
     /* Is SARA AM. Decompose and reorder. */
-    uint16_t decomposed[2] = {NIKHAHIT_FROM_SARA_AM (buffer->info[buffer->idx].codepoint),
-			      SARA_AA_FROM_SARA_AM (buffer->info[buffer->idx].codepoint)};
+    uint16_t decomposed[2] = {uint16_t (NIKHAHIT_FROM_SARA_AM (u)),
+			      uint16_t (SARA_AA_FROM_SARA_AM (u))};
     buffer->replace_glyphs (1, 2, decomposed);
     if (unlikely (buffer->in_error))
       return;



More information about the HarfBuzz mailing list