[config] Fix build with HB_NO_OT_LAYOUT

This commit is contained in:
Behdad Esfahbod 2019-06-26 13:44:10 -07:00
parent 2804790bce
commit 7dcf8e126e
4 changed files with 14 additions and 4 deletions

View File

@ -88,11 +88,13 @@ HB_OT_TABLE (OT, kern)
#endif #endif
/* OpenType shaping. */ /* OpenType shaping. */
#ifndef HB_NO_OT_LAYOUT
HB_OT_ACCELERATOR (OT, GDEF) HB_OT_ACCELERATOR (OT, GDEF)
HB_OT_ACCELERATOR (OT, GSUB) HB_OT_ACCELERATOR (OT, GSUB)
HB_OT_ACCELERATOR (OT, GPOS) HB_OT_ACCELERATOR (OT, GPOS)
//HB_OT_TABLE (OT, BASE) //HB_OT_TABLE (OT, BASE)
//HB_OT_TABLE (OT, JSTF) //HB_OT_TABLE (OT, JSTF)
#endif
/* AAT shaping. */ /* AAT shaping. */
#ifndef HB_NO_AAT #ifndef HB_NO_AAT

View File

@ -1737,13 +1737,13 @@ struct GPOS_accelerator_t : GPOS::accelerator_t {};
/* Out-of-class implementation for methods recursing */ /* Out-of-class implementation for methods recursing */
#ifndef HB_NO_OT_LAYOUT
template <typename context_t> template <typename context_t>
/*static*/ 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 PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index); const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
return l.dispatch (c); return l.dispatch (c);
} }
/*static*/ inline bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) /*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); 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); c->set_lookup_props (saved_lookup_props);
return ret; return ret;
} }
#endif
} /* namespace OT */ } /* namespace OT */

View File

@ -1409,6 +1409,7 @@ struct GSUB_accelerator_t : GSUB::accelerator_t {};
/* Out-of-class implementation for methods recursing */ /* Out-of-class implementation for methods recursing */
#ifndef HB_NO_OT_LAYOUT
/*static*/ inline bool ExtensionSubst::is_reverse () const /*static*/ inline bool ExtensionSubst::is_reverse () const
{ {
unsigned int type = get_type (); 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 CastR<ExtensionSubst> (get_subtable<SubTable>()).is_reverse ();
return SubstLookup::lookup_type_is_reverse (type); return SubstLookup::lookup_type_is_reverse (type);
} }
template <typename context_t> template <typename context_t>
/*static*/ 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 SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index); const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
return l.dispatch (c); return l.dispatch (c);
} }
/*static*/ inline bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) /*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); 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); c->set_lookup_props (saved_lookup_props);
return ret; return ret;
} }
#endif
} /* namespace OT */ } /* namespace OT */

View File

@ -483,7 +483,13 @@ struct hb_ot_apply_context_t :
iter_input (), iter_context (), iter_input (), iter_context (),
font (font_), face (font->face), buffer (buffer_), font (font_), face (font->face), buffer (buffer_),
recurse_func (nullptr), 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 ()), var_store (gdef.get_var_store ()),
direction (buffer_->props.direction), direction (buffer_->props.direction),
lookup_mask (1), lookup_mask (1),