[config] Fix build with HB_NO_OT_LAYOUT
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 26 Jun 2019 20:44:10 +0000 (13:44 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 26 Jun 2019 20:44:23 +0000 (13:44 -0700)
src/hb-ot-face-table-list.hh
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsubgpos.hh

index d07f53c..ac70527 100644 (file)
@@ -88,11 +88,13 @@ HB_OT_TABLE (OT, kern)
 #endif
 
 /* OpenType shaping. */
+#ifndef HB_NO_OT_LAYOUT
 HB_OT_ACCELERATOR (OT, GDEF)
 HB_OT_ACCELERATOR (OT, GSUB)
 HB_OT_ACCELERATOR (OT, GPOS)
 //HB_OT_TABLE (OT, BASE)
 //HB_OT_TABLE (OT, JSTF)
+#endif
 
 /* AAT shaping. */
 #ifndef HB_NO_AAT
index d371c4b..f4be42c 100644 (file)
@@ -1737,13 +1737,13 @@ struct GPOS_accelerator_t : GPOS::accelerator_t {};
 
 /* Out-of-class implementation for methods recursing */
 
+#ifndef HB_NO_OT_LAYOUT
 template <typename context_t>
 /*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
 {
   const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
   return l.dispatch (c);
 }
-
 /*static*/ inline bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
 {
   const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
@@ -1756,6 +1756,7 @@ template <typename context_t>
   c->set_lookup_props (saved_lookup_props);
   return ret;
 }
+#endif
 
 
 } /* namespace OT */
index f532f9d..a6cc1a2 100644 (file)
@@ -1409,6 +1409,7 @@ struct GSUB_accelerator_t : GSUB::accelerator_t {};
 
 /* Out-of-class implementation for methods recursing */
 
+#ifndef HB_NO_OT_LAYOUT
 /*static*/ inline bool ExtensionSubst::is_reverse () const
 {
   unsigned int type = get_type ();
@@ -1416,14 +1417,12 @@ struct GSUB_accelerator_t : GSUB::accelerator_t {};
     return CastR<ExtensionSubst> (get_subtable<SubTable>()).is_reverse ();
   return SubstLookup::lookup_type_is_reverse (type);
 }
-
 template <typename context_t>
 /*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
 {
   const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
   return l.dispatch (c);
 }
-
 /*static*/ inline bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
 {
   const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
@@ -1436,6 +1435,8 @@ template <typename context_t>
   c->set_lookup_props (saved_lookup_props);
   return ret;
 }
+#endif
+
 
 } /* namespace OT */
 
index 9a82a4d..c6e6ac9 100644 (file)
@@ -483,7 +483,13 @@ struct hb_ot_apply_context_t :
                        iter_input (), iter_context (),
                        font (font_), face (font->face), buffer (buffer_),
                        recurse_func (nullptr),
-                       gdef (*face->table.GDEF->table),
+                       gdef (
+#ifndef HB_NO_OT_LAYOUT
+                             *face->table.GDEF->table
+#else
+                             Null(GDEF)
+#endif
+                            ),
                        var_store (gdef.get_var_store ()),
                        direction (buffer_->props.direction),
                        lookup_mask (1),