[GSUB] Minor
This commit is contained in:
parent
d79cae0b4e
commit
64e67f7599
|
@ -635,8 +635,7 @@ struct SubstLookupSubTable {
|
||||||
|
|
||||||
friend struct SubstLookup;
|
friend struct SubstLookup;
|
||||||
|
|
||||||
inline bool substitute (LOOKUP_ARGS_DEF,
|
inline bool substitute (LOOKUP_ARGS_DEF, unsigned int lookup_type) const {
|
||||||
unsigned int lookup_type) const {
|
|
||||||
|
|
||||||
switch (lookup_type) {
|
switch (lookup_type) {
|
||||||
case GSUB_Single: return u.single->substitute (LOOKUP_ARGS);
|
case GSUB_Single: return u.single->substitute (LOOKUP_ARGS);
|
||||||
|
@ -644,7 +643,7 @@ struct SubstLookupSubTable {
|
||||||
case GSUB_Alternate: return u.alternate->substitute (LOOKUP_ARGS);
|
case GSUB_Alternate: return u.alternate->substitute (LOOKUP_ARGS);
|
||||||
case GSUB_Ligature: return u.ligature->substitute (LOOKUP_ARGS);
|
case GSUB_Ligature: return u.ligature->substitute (LOOKUP_ARGS);
|
||||||
case GSUB_Context: return u.context->substitute (LOOKUP_ARGS);
|
case GSUB_Context: return u.context->substitute (LOOKUP_ARGS);
|
||||||
case GSUB_ChainContext: return u.chainingContext->substitute (LOOKUP_ARGS);
|
case GSUB_ChainContext: return u.chainContext->substitute (LOOKUP_ARGS);
|
||||||
case GSUB_Extension: return u.extension->substitute (LOOKUP_ARGS);
|
case GSUB_Extension: return u.extension->substitute (LOOKUP_ARGS);
|
||||||
case GSUB_ReverseChainSingle: return u.reverseChainContextSingle->substitute (LOOKUP_ARGS);
|
case GSUB_ReverseChainSingle: return u.reverseChainContextSingle->substitute (LOOKUP_ARGS);
|
||||||
default:return false;
|
default:return false;
|
||||||
|
@ -659,7 +658,7 @@ struct SubstLookupSubTable {
|
||||||
AlternateSubst alternate[];
|
AlternateSubst alternate[];
|
||||||
LigatureSubst ligature[];
|
LigatureSubst ligature[];
|
||||||
ContextSubst context[];
|
ContextSubst context[];
|
||||||
ChainContextSubst chainingContext[];
|
ChainContextSubst chainContext[];
|
||||||
ExtensionSubst extension[];
|
ExtensionSubst extension[];
|
||||||
ReverseChainSingleSubst reverseChainContextSingle[];
|
ReverseChainSingleSubst reverseChainContextSingle[];
|
||||||
} u;
|
} u;
|
||||||
|
@ -707,15 +706,13 @@ struct SubstLookup : Lookup {
|
||||||
unsigned int lookup_flag = get_flag ();
|
unsigned int lookup_flag = get_flag ();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < get_subtable_count (); i++)
|
for (unsigned int i = 0; i < get_subtable_count (); i++)
|
||||||
if (get_subtable (i).substitute (LOOKUP_ARGS,
|
if (get_subtable (i).substitute (LOOKUP_ARGS, lookup_type))
|
||||||
lookup_type))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool substitute_once (hb_ot_layout_t *layout,
|
inline bool substitute_once (hb_ot_layout_t *layout, hb_buffer_t *buffer) const {
|
||||||
hb_buffer_t *buffer) const {
|
|
||||||
|
|
||||||
unsigned int lookup_flag = get_flag ();
|
unsigned int lookup_flag = get_flag ();
|
||||||
|
|
||||||
|
@ -806,8 +803,7 @@ inline bool ExtensionSubstFormat1::substitute (LOOKUP_ARGS_DEF) const {
|
||||||
if (HB_UNLIKELY (lookup_type == GSUB_Extension))
|
if (HB_UNLIKELY (lookup_type == GSUB_Extension))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return (*(SubstLookupSubTable *)(((char *) this) + get_offset ())).substitute (LOOKUP_ARGS,
|
return (*(SubstLookupSubTable *)(((char *) this) + get_offset ())).substitute (LOOKUP_ARGS, lookup_type);
|
||||||
lookup_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool substitute_lookup (LOOKUP_ARGS_DEF, unsigned int lookup_index) {
|
static inline bool substitute_lookup (LOOKUP_ARGS_DEF, unsigned int lookup_index) {
|
||||||
|
|
Loading…
Reference in New Issue