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

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Aug 20 07:40:17 PDT 2015


 src/hb-coretext.cc  |   20 ++++++++++----------
 src/hb-uniscribe.cc |    8 ++++----
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit ed6962c795ae7c54aaee9ed5667fa65ccf7412bf
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 20 15:39:53 2015 +0100

    [coretext] Use i32 instead of u32 as well
    
    Shouldn't cause *any* functional changes, but is more correct.

diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc
index b0df2f4..a9664ee 100644
--- a/src/hb-coretext.cc
+++ b/src/hb-coretext.cc
@@ -916,8 +916,8 @@ retry:
 	      info->cluster = log_clusters[j];
 
 	      info->mask = advance;
-	      info->var1.u32 = x_offset;
-	      info->var2.u32 = y_offset;
+	      info->var1.i32 = x_offset;
+	      info->var2.i32 = y_offset;
 
 	      info++;
 	      buffer->len++;
@@ -1003,8 +1003,8 @@ retry:
 	    else /* last glyph */
 	      advance = run_advance - (positions[j].x - positions[0].x);
 	    info->mask = advance * x_mult;
-	    info->var1.u32 = x_offset;
-	    info->var2.u32 = positions[j].y * y_mult;
+	    info->var1.i32 = x_offset;
+	    info->var2.i32 = positions[j].y * y_mult;
 	    info++;
 	  }
 	}
@@ -1019,8 +1019,8 @@ retry:
 	    else /* last glyph */
 	      advance = run_advance - (positions[j].y - positions[0].y);
 	    info->mask = advance * y_mult;
-	    info->var1.u32 = positions[j].x * x_mult;
-	    info->var2.u32 = y_offset;
+	    info->var1.i32 = positions[j].x * x_mult;
+	    info->var2.i32 = y_offset;
 	    info++;
 	  }
 	}
@@ -1059,16 +1059,16 @@ retry:
       for (unsigned int i = 0; i < count; i++)
       {
 	pos->x_advance = info->mask;
-	pos->x_offset = info->var1.u32;
-	pos->y_offset = info->var2.u32;
+	pos->x_offset = info->var1.i32;
+	pos->y_offset = info->var2.i32;
 	info++, pos++;
       }
     else
       for (unsigned int i = 0; i < count; i++)
       {
 	pos->y_advance = info->mask;
-	pos->x_offset = info->var1.u32;
-	pos->y_offset = info->var2.u32;
+	pos->x_offset = info->var1.i32;
+	pos->y_offset = info->var2.i32;
 	info++, pos++;
       }
 
commit 163c435f1807c138da9f74f09d29d913eb9e29e9
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 20 15:39:06 2015 +0100

    [uniscribe] Fix negative offsets
    
    Ouch!

diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 3a08c74..01be0cc 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -1006,8 +1006,8 @@ retry:
 
     /* The rest is crap.  Let's store position info there for now. */
     info->mask = advances[i];
-    info->var1.u32 = offsets[i].du;
-    info->var2.u32 = offsets[i].dv;
+    info->var1.i32 = offsets[i].du;
+    info->var2.i32 = offsets[i].dv;
   }
 
   /* Set glyph positions */
@@ -1020,8 +1020,8 @@ retry:
 
     /* TODO vertical */
     pos->x_advance = x_mult * info->mask;
-    pos->x_offset = x_mult * (backward ? -info->var1.u32 : info->var1.u32);
-    pos->y_offset = y_mult * info->var2.u32;
+    pos->x_offset = x_mult * (backward ? -info->var1.i32 : info->var1.i32);
+    pos->y_offset = y_mult * info->var2.i32;
   }
 
   if (backward)


More information about the HarfBuzz mailing list