[ot-layout] Simplify some access
This commit is contained in:
parent
db35409f0d
commit
33b006cc51
@ -410,7 +410,7 @@ struct GDEF
|
|||||||
|
|
||||||
struct accelerator_t
|
struct accelerator_t
|
||||||
{
|
{
|
||||||
HB_INTERNAL inline void init (hb_face_t *face);
|
HB_INTERNAL void init (hb_face_t *face);
|
||||||
|
|
||||||
inline void fini (void)
|
inline void fini (void)
|
||||||
{
|
{
|
||||||
|
@ -1736,18 +1736,21 @@ GPOS::position_finish_offsets (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct GPOS_accelerator_t : GPOS::accelerator_t {};
|
||||||
|
|
||||||
|
|
||||||
/* Out-of-class implementation for methods recursing */
|
/* Out-of-class implementation for methods recursing */
|
||||||
|
|
||||||
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 = _get_gpos_relaxed (c->face)->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 = _get_gpos_relaxed (c->face).get_lookup (lookup_index);
|
const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
|
||||||
unsigned int saved_lookup_props = c->lookup_props;
|
unsigned int saved_lookup_props = c->lookup_props;
|
||||||
unsigned int saved_lookup_index = c->lookup_index;
|
unsigned int saved_lookup_index = c->lookup_index;
|
||||||
c->set_lookup_index (lookup_index);
|
c->set_lookup_index (lookup_index);
|
||||||
@ -1758,8 +1761,6 @@ template <typename context_t>
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GPOS_accelerator_t : GPOS::accelerator_t {};
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace OT */
|
} /* namespace OT */
|
||||||
|
|
||||||
|
@ -1487,6 +1487,9 @@ struct GSUB : GSUBGPOS
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct GSUB_accelerator_t : GSUB::accelerator_t {};
|
||||||
|
|
||||||
|
|
||||||
/* Out-of-class implementation for methods recursing */
|
/* Out-of-class implementation for methods recursing */
|
||||||
|
|
||||||
/*static*/ inline bool ExtensionSubst::is_reverse (void) const
|
/*static*/ inline bool ExtensionSubst::is_reverse (void) const
|
||||||
@ -1500,13 +1503,13 @@ struct GSUB : GSUBGPOS
|
|||||||
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 = _get_gsub_relaxed (c->face).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 = _get_gsub_relaxed (c->face).get_lookup (lookup_index);
|
const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
|
||||||
unsigned int saved_lookup_props = c->lookup_props;
|
unsigned int saved_lookup_props = c->lookup_props;
|
||||||
unsigned int saved_lookup_index = c->lookup_index;
|
unsigned int saved_lookup_index = c->lookup_index;
|
||||||
c->set_lookup_index (lookup_index);
|
c->set_lookup_index (lookup_index);
|
||||||
@ -1517,8 +1520,6 @@ template <typename context_t>
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GSUB_accelerator_t : GSUB::accelerator_t {};
|
|
||||||
|
|
||||||
} /* namespace OT */
|
} /* namespace OT */
|
||||||
|
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ 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 (_get_gdef (face)),
|
gdef (*face->table.GDEF->table),
|
||||||
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),
|
||||||
|
@ -38,19 +38,9 @@
|
|||||||
#include "hb-set-digest.hh"
|
#include "hb-set-digest.hh"
|
||||||
|
|
||||||
|
|
||||||
namespace OT
|
|
||||||
{
|
|
||||||
struct GDEF;
|
|
||||||
struct GSUB;
|
|
||||||
struct GPOS;
|
|
||||||
}
|
|
||||||
|
|
||||||
HB_INTERNAL const OT::GDEF& _get_gdef (hb_face_t *face);
|
|
||||||
HB_INTERNAL const OT::GSUB& _get_gsub_relaxed (hb_face_t *face);
|
|
||||||
HB_INTERNAL const OT::GPOS& _get_gpos_relaxed (hb_face_t *face);
|
|
||||||
|
|
||||||
struct hb_ot_shape_plan_t;
|
struct hb_ot_shape_plan_t;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* kern
|
* kern
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user