[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Feb 27 17:44:37 PST 2013


 src/hb-ot-map-private.hh         |    2 ++
 src/hb-ot-shape-complex-indic.cc |   24 ++++++++++++------------
 2 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit 41732f1fe3ce856d8bb95850635034537b6ba047
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Feb 27 20:40:54 2013 -0500

    [Indic] Help compiler put indic_features table in .rodata
    
    The overridden "or" operator was preventing the flag expression from
    being const, and putting the table in .data instead or .rodata.

diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh
index 942e9f4..bc82557 100644
--- a/src/hb-ot-map-private.hh
+++ b/src/hb-ot-map-private.hh
@@ -154,6 +154,8 @@ enum hb_ot_map_feature_flags_t {
   F_HAS_FALLBACK	= 0x0002,
   F_MANUAL_JOINERS	= 0x0004
 };
+/* Macro version for where const is desired. */
+#define F_COMBINE(l,r) (hb_ot_map_feature_flags_t ((unsigned int) (l) | (unsigned int) (r)))
 inline hb_ot_map_feature_flags_t
 operator | (hb_ot_map_feature_flags_t l, hb_ot_map_feature_flags_t r)
 { return hb_ot_map_feature_flags_t ((unsigned int) l | (unsigned int) r); }
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 644cbb1..9125d4d 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -339,18 +339,18 @@ indic_features[] =
    * Basic features.
    * These features are applied in order, one at a time, after initial_reordering.
    */
-  {HB_TAG('n','u','k','t'), F_MANUAL_JOINERS | F_GLOBAL},
-  {HB_TAG('a','k','h','n'), F_MANUAL_JOINERS | F_GLOBAL},
-  {HB_TAG('r','p','h','f'), F_MANUAL_JOINERS},
-  {HB_TAG('r','k','r','f'), F_MANUAL_JOINERS | F_GLOBAL},
-  {HB_TAG('p','r','e','f'), F_MANUAL_JOINERS},
-  {HB_TAG('b','l','w','f'), F_MANUAL_JOINERS},
-  {HB_TAG('h','a','l','f'), F_MANUAL_JOINERS},
-  {HB_TAG('a','b','v','f'), F_MANUAL_JOINERS},
-  {HB_TAG('p','s','t','f'), F_MANUAL_JOINERS},
-  {HB_TAG('c','f','a','r'), F_MANUAL_JOINERS},
-  {HB_TAG('v','a','t','u'), F_MANUAL_JOINERS | F_GLOBAL},
-  {HB_TAG('c','j','c','t'), F_MANUAL_JOINERS | F_GLOBAL},
+  {HB_TAG('n','u','k','t'), F_COMBINE (F_MANUAL_JOINERS, F_GLOBAL)},
+  {HB_TAG('a','k','h','n'), F_COMBINE (F_MANUAL_JOINERS, F_GLOBAL)},
+  {HB_TAG('r','p','h','f'), F_COMBINE (F_MANUAL_JOINERS, F_NONE  )},
+  {HB_TAG('r','k','r','f'), F_COMBINE (F_MANUAL_JOINERS, F_GLOBAL)},
+  {HB_TAG('p','r','e','f'), F_COMBINE (F_MANUAL_JOINERS, F_NONE  )},
+  {HB_TAG('b','l','w','f'), F_COMBINE (F_MANUAL_JOINERS, F_NONE  )},
+  {HB_TAG('h','a','l','f'), F_COMBINE (F_MANUAL_JOINERS, F_NONE  )},
+  {HB_TAG('a','b','v','f'), F_COMBINE (F_MANUAL_JOINERS, F_NONE  )},
+  {HB_TAG('p','s','t','f'), F_COMBINE (F_MANUAL_JOINERS, F_NONE  )},
+  {HB_TAG('c','f','a','r'), F_COMBINE (F_MANUAL_JOINERS, F_NONE  )},
+  {HB_TAG('v','a','t','u'), F_COMBINE (F_MANUAL_JOINERS, F_GLOBAL)},
+  {HB_TAG('c','j','c','t'), F_COMBINE (F_MANUAL_JOINERS, F_GLOBAL)},
   /*
    * Other features.
    * These features are applied all at once, after final_reordering.



More information about the HarfBuzz mailing list