Merge branch 'master' into cff-subset
authorMichiharu Ariza <ariza@adobe.com>
Thu, 29 Nov 2018 00:27:45 +0000 (16:27 -0800)
committerMichiharu Ariza <ariza@adobe.com>
Thu, 29 Nov 2018 00:27:45 +0000 (16:27 -0800)
1  2 
src/Makefile.sources
src/hb-null.hh
src/hb-ot-face.hh
src/hb-ot-font.cc
src/hb-ot-layout-common.hh
src/hb-ot-vorg-table.hh
test/api/Makefile.am

Simple merge
diff --cc src/hb-null.hh
  
  /* Global nul-content Null pool.  Enlarge as necessary. */
  
 -#define HB_NULL_POOL_SIZE 1024
 +#define HB_NULL_POOL_SIZE 9880
  
+ /* Use SFINAE to sniff whether T has min_size; in which case return T::null_size,
+  * otherwise return sizeof(T). */
+ /* The hard way...
+  * https://stackoverflow.com/questions/7776448/sfinae-tried-with-bool-gives-compiler-error-template-argument-tvalue-invol
+  */
+ template<bool> struct _hb_bool_type {};
+ template <typename T, typename B>
+ struct _hb_null_size
+ { enum { value = sizeof (T) }; };
+ template <typename T>
+ struct _hb_null_size<T, _hb_bool_type<(bool) (1 + (unsigned int) T::min_size)> >
+ { enum { value = T::null_size }; };
+ template <typename T>
+ struct hb_null_size
+ { enum { value = _hb_null_size<T, _hb_bool_type<true> >::value }; };
+ #define hb_null_size(T) hb_null_size<T>::value
+ /* This doesn't belong here, but since is copy/paste from above, put it here. */
+ template <typename T, typename B>
+ struct _hb_static_size
+ { enum { value = sizeof (T) }; };
+ template <typename T>
+ struct _hb_static_size<T, _hb_bool_type<(bool) (1 + (unsigned int) T::min_size)> >
+ { enum { value = T::static_size }; };
+ template <typename T>
+ struct hb_static_size
+ { enum { value = _hb_static_size<T, _hb_bool_type<true> >::value }; };
+ #define hb_static_size(T) hb_static_size<T>::value
+ /*
+  * Null()
+  */
  extern HB_INTERNAL
  hb_vector_size_impl_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (hb_vector_size_impl_t) - 1) / sizeof (hb_vector_size_impl_t)];
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge