private:
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ return (this+coverage) (glyph_id) != NOT_COVERED;
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
private:
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ return (this+coverage) (glyph_id) != NOT_COVERED;
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
private:
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.would_apply (glyph_id);
+ case 2: return u.format2.would_apply (glyph_id);
+ default:return false;
+ }
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
private:
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ return (this+coverage) (glyph_id) != NOT_COVERED;
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
private:
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.would_apply (glyph_id);
+ default:return false;
+ }
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
private:
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ return (this+coverage) (glyph_id) != NOT_COVERED;
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
hb_codepoint_t glyph_id = c->buffer->info[c->buffer->idx].codepoint;
- hb_mask_t glyph_mask = c->buffer->info[c->buffer->idx].mask;
- hb_mask_t lookup_mask = c->lookup_mask;
unsigned int index = (this+coverage) (glyph_id);
if (likely (index == NOT_COVERED))
if (unlikely (!alt_set.len))
return false;
+ hb_mask_t glyph_mask = c->buffer->info[c->buffer->idx].mask;
+ hb_mask_t lookup_mask = c->lookup_mask;
+
/* Note: This breaks badly if two features enabled this lookup together. */
unsigned int shift = _hb_ctz (lookup_mask);
unsigned int alt_index = ((lookup_mask & glyph_mask) >> shift);
private:
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.would_apply (glyph_id);
+ default:return false;
+ }
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
friend struct LigatureSet;
private:
+
+ inline bool would_apply (hb_codepoint_t second) const
+ {
+ return component.len == 2 && component[1] == second;
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
friend struct LigatureSubstFormat1;
private:
+
+ inline bool would_apply (hb_codepoint_t second) const
+ {
+ unsigned int num_ligs = ligature.len;
+ for (unsigned int i = 0; i < num_ligs; i++)
+ {
+ const Ligature &lig = this+ligature[i];
+ if (lig.would_apply (second))
+ return true;
+ }
+ return false;
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
friend struct LigatureSubst;
private:
+
+ inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const
+ {
+ unsigned int index;
+ return (index = (this+coverage) (first)) != NOT_COVERED &&
+ (this+ligatureSet[index]).would_apply (second);
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
friend struct SubstLookupSubTable;
private:
+
+ inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.would_apply (first, second);
+ default:return false;
+ }
+ }
+
inline bool apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();
return StructAtOffset<SubstLookupSubTable> (this, offset);
}
+ inline bool would_apply (hb_codepoint_t glyph_id) const;
+ inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const;
+
inline bool apply (hb_apply_context_t *c) const;
inline bool sanitize (hb_sanitize_context_t *c);
ReverseChainSingle = 8
};
+ inline bool would_apply (hb_codepoint_t glyph_id,
+ unsigned int lookup_type) const
+ {
+ switch (lookup_type) {
+ case Single: return u.single.would_apply (glyph_id);
+ case Multiple: return u.multiple.would_apply (glyph_id);
+ case Alternate: return u.alternate.would_apply (glyph_id);
+ case Extension: return u.extension.would_apply (glyph_id);
+ default:return false;
+ }
+ }
+ inline bool would_apply (hb_codepoint_t first,
+ hb_codepoint_t second,
+ unsigned int lookup_type) const
+ {
+ switch (lookup_type) {
+ case Ligature: return u.ligature.would_apply (first, second);
+ case Extension: return u.extension.would_apply (first, second);
+ default:return false;
+ }
+ }
+
inline bool apply (hb_apply_context_t *c, unsigned int lookup_type) const
{
TRACE_APPLY ();
}
+ inline bool would_apply (hb_codepoint_t glyph_id) const
+ {
+ unsigned int lookup_type = get_type ();
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++)
+ if (get_subtable (i).would_apply (glyph_id, lookup_type))
+ return true;
+ return false;
+ }
+ inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const
+ {
+ unsigned int lookup_type = get_type ();
+ unsigned int count = get_subtable_count ();
+ for (unsigned int i = 0; i < count; i++)
+ if (get_subtable (i).would_apply (first, second, lookup_type))
+ return true;
+ return false;
+ }
+
inline bool apply_once (hb_apply_context_t *c) const
{
unsigned int lookup_type = get_type ();
/* Out-of-class implementation for methods recursing */
+inline bool ExtensionSubst::would_apply (hb_codepoint_t glyph_id) const
+{
+ return get_subtable ().would_apply (glyph_id, get_type ());
+}
+
+inline bool ExtensionSubst::would_apply (hb_codepoint_t first, hb_codepoint_t second) const
+{
+ return get_subtable ().would_apply (first, second, get_type ());
+}
+
inline bool ExtensionSubst::apply (hb_apply_context_t *c) const
{
TRACE_APPLY ();