[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Dec 17 20:29:30 PST 2012


 src/hb-ot-layout-common-private.hh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 1ffd23cb47a61465d52a7aeebb9c1b676e7c9a7e
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Dec 17 23:29:15 2012 -0500

    [OTLayout] Limit alternate-location FeatureParams to 'size' feature

diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh
index bff383a..e6018db 100644
--- a/src/hb-ot-layout-common-private.hh
+++ b/src/hb-ot-layout-common-private.hh
@@ -495,6 +495,9 @@ struct Feature
      * If sanitizing "failed" for the FeatureParams subtable, try it with the
      * alternative location.  We would know sanitize "failed" if old value
      * of the offset was non-zero, but it's zeroed now.
+     *
+     * Only do this for the 'size' feature, since at the time of the faulty
+     * Adobe tools, only the 'size' feature had FeatureParams defined.
      */
 
     Offset orig_offset = featureParams;
@@ -504,7 +507,9 @@ struct Feature
     if (likely (!orig_offset))
       return TRACE_RETURN (true);
 
-    if (featureParams == 0 && closure && closure->list_base && closure->list_base < this)
+    if (featureParams == 0 && closure &&
+	closure->tag == HB_TAG ('s','i','z','e') &&
+	closure->list_base && closure->list_base < this)
     {
       unsigned int new_offset_int = (unsigned int) orig_offset -
 				    ((char *) this - (char *) closure->list_base);



More information about the HarfBuzz mailing list