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

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Apr 28 14:36:11 PDT 2014


 NEWS                           |   13 +++++++++++++
 configure.ac                   |    2 +-
 src/hb-open-type-private.hh    |   22 +++++++++++-----------
 src/hb-ot-layout-gpos-table.hh |    4 ++--
 src/hb-ot-layout-gsub-table.hh |    6 +++---
 src/hb-ot-layout-private.hh    |   36 ++++++++++++++++++------------------
 src/hb-ot-map-private.hh       |   10 +++++-----
 src/hb-private.hh              |    2 +-
 8 files changed, 54 insertions(+), 41 deletions(-)

New commits:
commit 79ecdc3f9525212053d2bc88a5541c41697159da
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Apr 28 14:24:23 2014 -0700

    0.9.28

diff --git a/NEWS b/NEWS
index 2d7654c..c2883ae 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,16 @@
+Overview of changes leading to 0.9.28
+Monday, April 28, 2014
+=====================================
+
+- Unbreak old-spec Indic shaping. (bug 76705)
+- Fix shaping of U+17DD and U+0FC6.
+- Add HB_NO_MERGE_CLUSTERS build option.  NOT to be enabled by default
+  for shipping libraries.  It's an option for further experimentation
+  right now.  When we are sure how to do it properly, we will add
+  public run-time API for the functionality.
+- Build fixes.
+
+
 Overview of changes leading to 0.9.27
 Tuesday, March 18, 2014
 =====================================
diff --git a/configure.ac b/configure.ac
index ba69b69..e10fb34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [0.9.27],
+        [0.9.28],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
         [harfbuzz],
         [http://harfbuzz.org/])
commit 6faff8e4132197ba06f0e685b82efe35b546cf64
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Apr 28 14:29:39 2014 -0700

    Add static storage classifier to inline functions
    
    Before we were just relying on the compiler inlining them and not
    leaving a trace in our public API.  Try to fix.  Hopefully not
    breaking anyone's build.

diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index 558103a..5a01a81 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -42,36 +42,36 @@ namespace OT {
 
 /* Cast to struct T, reference to reference */
 template<typename Type, typename TObject>
-inline const Type& CastR(const TObject &X)
+static inline const Type& CastR(const TObject &X)
 { return reinterpret_cast<const Type&> (X); }
 template<typename Type, typename TObject>
-inline Type& CastR(TObject &X)
+static inline Type& CastR(TObject &X)
 { return reinterpret_cast<Type&> (X); }
 
 /* Cast to struct T, pointer to pointer */
 template<typename Type, typename TObject>
-inline const Type* CastP(const TObject *X)
+static inline const Type* CastP(const TObject *X)
 { return reinterpret_cast<const Type*> (X); }
 template<typename Type, typename TObject>
-inline Type* CastP(TObject *X)
+static inline Type* CastP(TObject *X)
 { return reinterpret_cast<Type*> (X); }
 
 /* StructAtOffset<T>(P,Ofs) returns the struct T& that is placed at memory
  * location pointed to by P plus Ofs bytes. */
 template<typename Type>
-inline const Type& StructAtOffset(const void *P, unsigned int offset)
+static inline const Type& StructAtOffset(const void *P, unsigned int offset)
 { return * reinterpret_cast<const Type*> ((const char *) P + offset); }
 template<typename Type>
-inline Type& StructAtOffset(void *P, unsigned int offset)
+static inline Type& StructAtOffset(void *P, unsigned int offset)
 { return * reinterpret_cast<Type*> ((char *) P + offset); }
 
 /* StructAfter<T>(X) returns the struct T& that is placed after X.
  * Works with X of variable size also.  X must implement get_size() */
 template<typename Type, typename TObject>
-inline const Type& StructAfter(const TObject &X)
+static inline const Type& StructAfter(const TObject &X)
 { return StructAtOffset<Type>(&X, X.get_size()); }
 template<typename Type, typename TObject>
-inline Type& StructAfter(TObject &X)
+static inline Type& StructAfter(TObject &X)
 { return StructAtOffset<Type>(&X, X.get_size()); }
 
 
@@ -145,7 +145,7 @@ static inline const Type& Null (void) {
 #define DEFINE_NULL_DATA(Type, data) \
 static const char _Null##Type[sizeof (Type) + 1] = data; /* +1 is for nul-termination in data */ \
 template <> \
-inline const Type& Null<Type> (void) { \
+/*static*/ inline const Type& Null<Type> (void) { \
   return *CastP<Type> (_Null##Type); \
 } /* The following line really exists such that we end in a place needing semicolon */ \
 ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
@@ -738,9 +738,9 @@ struct GenericOffsetTo : OffsetType
   }
 };
 template <typename Base, typename OffsetType, typename Type>
-inline const Type& operator + (const Base &base, const GenericOffsetTo<OffsetType, Type> &offset) { return offset (base); }
+static inline const Type& operator + (const Base &base, const GenericOffsetTo<OffsetType, Type> &offset) { return offset (base); }
 template <typename Base, typename OffsetType, typename Type>
-inline Type& operator + (Base &base, GenericOffsetTo<OffsetType, Type> &offset) { return offset (base); }
+static inline Type& operator + (Base &base, GenericOffsetTo<OffsetType, Type> &offset) { return offset (base); }
 
 template <typename Type>
 struct OffsetTo : GenericOffsetTo<Offset, Type> {};
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 7c0a4ea..91e1f8b 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1608,14 +1608,14 @@ GPOS::position_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
 /* Out-of-class implementation for methods recursing */
 
 template <typename context_t>
-inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
+/*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
 {
   const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos);
   const PosLookup &l = gpos.get_lookup (lookup_index);
   return l.dispatch (c);
 }
 
-inline bool PosLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index)
+/*static*/ inline bool PosLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index)
 {
   const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->gpos);
   const PosLookup &l = gpos.get_lookup (lookup_index);
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 76b4f33..3a1a0ef 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -1338,7 +1338,7 @@ GSUB::substitute_finish (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer HB_UNUSE
 
 /* Out-of-class implementation for methods recursing */
 
-inline bool ExtensionSubst::is_reverse (void) const
+/*static*/ inline bool ExtensionSubst::is_reverse (void) const
 {
   unsigned int type = get_type ();
   if (unlikely (type == SubstLookupSubTable::Extension))
@@ -1347,14 +1347,14 @@ inline bool ExtensionSubst::is_reverse (void) const
 }
 
 template <typename context_t>
-inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
+/*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
 {
   const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub);
   const SubstLookup &l = gsub.get_lookup (lookup_index);
   return l.dispatch (c);
 }
 
-inline bool SubstLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index)
+/*static*/ inline bool SubstLookup::apply_recurse_func (hb_apply_context_t *c, unsigned int lookup_index)
 {
   const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->gsub);
   const SubstLookup &l = gsub.get_lookup (lookup_index);
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh
index 0a0a54b..4f03e1b 100644
--- a/src/hb-ot-layout-private.hh
+++ b/src/hb-ot-layout-private.hh
@@ -182,7 +182,7 @@ enum {
   MASK0_GEN_CAT   = 0x1Fu
 };
 
-inline void
+static inline void
 _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
 {
   /* XXX This shouldn't be inlined, or at least not while is_default_ignorable() is inline. */
@@ -193,51 +193,51 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *uni
   info->unicode_props1() = unicode->modified_combining_class (info->codepoint);
 }
 
-inline void
+static inline void
 _hb_glyph_info_set_general_category (hb_glyph_info_t *info,
 				     hb_unicode_general_category_t gen_cat)
 {
   info->unicode_props0() = (unsigned int) gen_cat | ((info->unicode_props0()) & ~MASK0_GEN_CAT);
 }
 
-inline hb_unicode_general_category_t
+static inline hb_unicode_general_category_t
 _hb_glyph_info_get_general_category (const hb_glyph_info_t *info)
 {
   return (hb_unicode_general_category_t) (info->unicode_props0() & MASK0_GEN_CAT);
 }
 
-inline void
+static inline void
 _hb_glyph_info_set_modified_combining_class (hb_glyph_info_t *info,
 					     unsigned int modified_class)
 {
   info->unicode_props1() = modified_class;
 }
 
-inline unsigned int
+static inline unsigned int
 _hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info)
 {
   return info->unicode_props1();
 }
 
-inline hb_bool_t
+static inline hb_bool_t
 _hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info)
 {
   return !!(info->unicode_props0() & MASK0_IGNORABLE);
 }
 
-inline hb_bool_t
+static inline hb_bool_t
 _hb_glyph_info_is_zwnj (const hb_glyph_info_t *info)
 {
   return !!(info->unicode_props0() & MASK0_ZWNJ);
 }
 
-inline hb_bool_t
+static inline hb_bool_t
 _hb_glyph_info_is_zwj (const hb_glyph_info_t *info)
 {
   return !!(info->unicode_props0() & MASK0_ZWJ);
 }
 
-inline void
+static inline void
 _hb_glyph_info_flip_joiners (hb_glyph_info_t *info)
 {
   info->unicode_props0() ^= MASK0_ZWNJ | MASK0_ZWJ;
@@ -339,31 +339,31 @@ _hb_allocate_lig_id (hb_buffer_t *buffer) {
 
 /* glyph_props: */
 
-inline void
+static inline void
 _hb_glyph_info_set_glyph_props (hb_glyph_info_t *info, unsigned int props)
 {
   info->glyph_props() = props;
 }
 
-inline unsigned int
+static inline unsigned int
 _hb_glyph_info_get_glyph_props (const hb_glyph_info_t *info)
 {
   return info->glyph_props();
 }
 
-inline bool
+static inline bool
 _hb_glyph_info_is_base_glyph (const hb_glyph_info_t *info)
 {
   return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH);
 }
 
-inline bool
+static inline bool
 _hb_glyph_info_is_ligature (const hb_glyph_info_t *info)
 {
   return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE);
 }
 
-inline bool
+static inline bool
 _hb_glyph_info_is_mark (const hb_glyph_info_t *info)
 {
   return !!(info->glyph_props() & HB_OT_LAYOUT_GLYPH_PROPS_MARK);
@@ -383,21 +383,21 @@ _hb_glyph_info_ligated (const hb_glyph_info_t *info)
 
 /* Allocation / deallocation. */
 
-inline void
+static inline void
 _hb_buffer_allocate_unicode_vars (hb_buffer_t *buffer)
 {
   HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props0);
   HB_BUFFER_ALLOCATE_VAR (buffer, unicode_props1);
 }
 
-inline void
+static inline void
 _hb_buffer_deallocate_unicode_vars (hb_buffer_t *buffer)
 {
   HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props0);
   HB_BUFFER_DEALLOCATE_VAR (buffer, unicode_props1);
 }
 
-inline void
+static inline void
 _hb_buffer_allocate_gsubgpos_vars (hb_buffer_t *buffer)
 {
   HB_BUFFER_ALLOCATE_VAR (buffer, glyph_props);
@@ -405,7 +405,7 @@ _hb_buffer_allocate_gsubgpos_vars (hb_buffer_t *buffer)
   HB_BUFFER_ALLOCATE_VAR (buffer, syllable);
 }
 
-inline void
+static inline void
 _hb_buffer_deallocate_gsubgpos_vars (hb_buffer_t *buffer)
 {
   HB_BUFFER_DEALLOCATE_VAR (buffer, syllable);
diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh
index 0e718a6..74e2d9a 100644
--- a/src/hb-ot-map-private.hh
+++ b/src/hb-ot-map-private.hh
@@ -160,19 +160,19 @@ enum hb_ot_map_feature_flags_t {
 };
 /* 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
+static 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); }
-inline hb_ot_map_feature_flags_t
+static 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); }
-inline hb_ot_map_feature_flags_t
+static inline hb_ot_map_feature_flags_t
 operator ~ (hb_ot_map_feature_flags_t r)
 { return hb_ot_map_feature_flags_t (~(unsigned int) r); }
-inline hb_ot_map_feature_flags_t&
+static inline hb_ot_map_feature_flags_t&
 operator |= (hb_ot_map_feature_flags_t &l, hb_ot_map_feature_flags_t r)
 { l = l | r; return l; }
-inline hb_ot_map_feature_flags_t&
+static inline hb_ot_map_feature_flags_t&
 operator &= (hb_ot_map_feature_flags_t& l, hb_ot_map_feature_flags_t r)
 { l = l & r; return l; }
 
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 344c71b..e5011e2 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -725,7 +725,7 @@ static inline void _hb_warn_no_return (bool returned)
   }
 }
 template <>
-inline void _hb_warn_no_return<hb_void_t> (bool returned HB_UNUSED)
+/*static*/ inline void _hb_warn_no_return<hb_void_t> (bool returned HB_UNUSED)
 {}
 
 template <int max_level, typename ret_t>


More information about the HarfBuzz mailing list