|
|
|
@ -55,11 +55,6 @@ struct SingleSubstFormat1 |
|
|
|
|
return this+coverage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
return c->len == 1 && (this+coverage) (c->first) != NOT_COVERED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -112,11 +107,6 @@ struct SingleSubstFormat2 |
|
|
|
|
return this+coverage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
return c->len == 1 && (this+coverage) (c->first) != NOT_COVERED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -174,15 +164,6 @@ struct SingleSubst |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
switch (u.format) { |
|
|
|
|
case 1: return u.format1.would_apply (c); |
|
|
|
|
case 2: return u.format2.would_apply (c); |
|
|
|
|
default:return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -276,11 +257,6 @@ struct MultipleSubstFormat1 |
|
|
|
|
return this+coverage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
return c->len == 1 && (this+coverage) (c->first) != NOT_COVERED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -331,14 +307,6 @@ struct MultipleSubst |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
switch (u.format) { |
|
|
|
|
case 1: return u.format1.would_apply (c); |
|
|
|
|
default:return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -393,11 +361,6 @@ struct AlternateSubstFormat1 |
|
|
|
|
return this+coverage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
return c->len == 1 && (this+coverage) (c->first) != NOT_COVERED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -466,14 +429,6 @@ struct AlternateSubst |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
switch (u.format) { |
|
|
|
|
case 1: return u.format1.would_apply (c); |
|
|
|
|
default:return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -675,9 +630,7 @@ struct LigatureSubstFormat1 |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
unsigned int index; |
|
|
|
|
return (index = (this+coverage) (c->first)) != NOT_COVERED && |
|
|
|
|
(this+ligatureSet[index]).would_apply (c); |
|
|
|
|
return (this+ligatureSet[(this+coverage) (c->first)]).would_apply (c); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
@ -871,11 +824,6 @@ struct ReverseChainSingleSubstFormat1 |
|
|
|
|
return this+coverage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
return c->len == 1 && (this+coverage) (c->first) != NOT_COVERED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -958,14 +906,6 @@ struct ReverseChainSingleSubst |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool would_apply (hb_would_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
switch (u.format) { |
|
|
|
|
case 1: return u.format1.would_apply (c); |
|
|
|
|
default:return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline bool apply (hb_apply_context_t *c) const |
|
|
|
|
{ |
|
|
|
|
TRACE_APPLY (); |
|
|
|
@ -1048,15 +988,16 @@ struct SubstLookupSubTable |
|
|
|
|
unsigned int lookup_type) const |
|
|
|
|
{ |
|
|
|
|
TRACE_WOULD_APPLY (); |
|
|
|
|
if (get_coverage (lookup_type).get_coverage (c->first) == NOT_COVERED) return false; |
|
|
|
|
if (c->len == 1) return true; /* Done! */ |
|
|
|
|
|
|
|
|
|
/* Only need to look further for lookups that support substitutions
|
|
|
|
|
* of input longer than 1. */ |
|
|
|
|
switch (lookup_type) { |
|
|
|
|
case Single: return u.single.would_apply (c); |
|
|
|
|
case Multiple: return u.multiple.would_apply (c); |
|
|
|
|
case Alternate: return u.alternate.would_apply (c); |
|
|
|
|
case Ligature: return u.ligature.would_apply (c); |
|
|
|
|
case Context: return u.context.would_apply (c); |
|
|
|
|
case ChainContext: return u.chainContext.would_apply (c); |
|
|
|
|
case Extension: return u.extension.would_apply (c); |
|
|
|
|
case ReverseChainSingle: return u.reverseChainContextSingle.would_apply (c); |
|
|
|
|
default: return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|