src/hb-open-type-private.hh |    9 +++++++++
 src/hb-ot-glyf-table.hh     |    8 ++++----
 src/hb-ot-hmtx-table.hh     |    6 +++---
 src/hb-ot-map.cc            |    5 +----
 4 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit 731a430cd36caabcef04e099b21ebc6daedd536f
Author: Behdad Esfahbod <[email protected]>
Date:   Wed Mar 2 13:32:42 2016 -0800

    Fix requiredFeature stage handling logic
    
    Originally the way Jonathan had written this was correct in
    "continue"ing:
    
    
https://github.com/jfkthame/harfbuzz/commit/35e28c7a733eaffcd9f062b18d7db9fbb3d990fc#diff-ead86a33a5cc9ad7f6e6381031a0baddR199
    
    When I rewrote his patch, I messed it up:
    
    
https://github.com/behdad/harfbuzz/commit/da132937989acb4d8ca9bd41c79f98750e7dda30#diff-ead86a33a5cc9ad7f6e6381031a0baddR209
    
    the intended behavior was NOT to set found=TRUE and NOT to continue.
    This was resulting in feature_index[table_index] being left unset.
    Oops!

diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc
index 7bdeddb..7822cef 100644
--- a/src/hb-ot-map.cc
+++ b/src/hb-ot-map.cc
@@ -204,11 +204,8 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m)
     for (unsigned int table_index = 0; table_index < 2; table_index++)
     {
       if (required_feature_tag[table_index] == info->tag)
-      {
        required_feature_stage[table_index] = info->stage[table_index];
-       found = true;
-       continue;
-      }
+
       found |= hb_ot_layout_language_find_feature (face,
                                                   table_tags[table_index],
                                                   script_index[table_index],
commit 68b6296d3333fd38bd5442d2ba087ced481603bc
Author: Behdad Esfahbod <[email protected]>
Date:   Tue Mar 1 16:41:53 2016 +0900

    Add F2DOT14 type

diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index 6a52000..0754ef0 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -662,6 +662,15 @@ typedef SHORT FWORD;
 /* 16-bit unsigned integer (USHORT) that describes a quantity in FUnits. */
 typedef USHORT UFWORD;
 
+/* 16-bit signed fixed number with the low 14 bits of fraction (2.14). */
+struct F2DOT14 : SHORT
+{
+  //inline float to_float (void) const { return ???; }
+  //inline void set_float (float f) { v.set (f * ???); }
+  public:
+  DEFINE_SIZE_STATIC (2);
+};
+
 /* Date represented in number of seconds since 12:00 midnight, January 1,
  * 1904. The value is represented as a signed 64-bit integer. */
 struct LONGDATETIME
commit 082b79fe9f06607998178dcdcbe817af28b017de
Author: Behdad Esfahbod <[email protected]>
Date:   Tue Mar 1 16:41:26 2016 +0900

    Use FWORD and UFWORD when it makes sense
    
    I had forgotten about those types.

diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh
index 9e5af6d..dc7aa84 100644
--- a/src/hb-ot-glyf-table.hh
+++ b/src/hb-ot-glyf-table.hh
@@ -90,10 +90,10 @@ struct glyfGlyphHeader
                                         * greater than or equal to zero,
                                         * this is a simple glyph; if negative,
                                         * this is a composite glyph. */
-  SHORT                xMin;                   /* Minimum x for coordinate 
data. */
-  SHORT                yMin;                   /* Minimum y for coordinate 
data. */
-  SHORT                xMax;                   /* Maximum x for coordinate 
data. */
-  SHORT                yMax;                   /* Maximum y for coordinate 
data. */
+  FWORD                xMin;                   /* Minimum x for coordinate 
data. */
+  FWORD                yMin;                   /* Minimum y for coordinate 
data. */
+  FWORD                xMax;                   /* Maximum x for coordinate 
data. */
+  FWORD                yMax;                   /* Maximum y for coordinate 
data. */
 
   DEFINE_SIZE_STATIC (10);
 };
diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
index 49056e6..a9606b3 100644
--- a/src/hb-ot-hmtx-table.hh
+++ b/src/hb-ot-hmtx-table.hh
@@ -44,8 +44,8 @@ namespace OT {
 
 struct LongMetric
 {
-  USHORT       advance; /* Advance width/height. */
-  SHORT                lsb; /* Leading (left/top) side bearing. */
+  UFWORD       advance; /* Advance width/height. */
+  FWORD                lsb; /* Leading (left/top) side bearing. */
   public:
   DEFINE_SIZE_STATIC (4);
 };
@@ -74,7 +74,7 @@ struct _mtx
                                         * be in the array, but that entry is
                                         * required. The last entry applies to
                                         * all subsequent glyphs. */
-  SHORT                leadingBearingX[VAR];   /* Here the advance is assumed
+  FWORD                leadingBearingX[VAR];   /* Here the advance is assumed
                                         * to be the same as the advance
                                         * for the last entry above. The
                                         * number of entries in this array is
_______________________________________________
HarfBuzz mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to