mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 07:21:06 +01:00
[OTLayout] Fix various introspection issues with ClassDef's
As reported by Jonathan Kew.
This commit is contained in:
1 parent
e81aff9ef7
commit
11fba79ee9
1 file changed
+15
-4
@@ -1175,7 +1175,7 @@ struct ContextFormat2
|
||||
|
||||
struct ContextClosureLookupContext lookup_context = {
|
||||
{intersects_class},
|
||||
NULL
|
||||
&class_def
|
||||
};
|
||||
|
||||
unsigned int count = ruleSet.len;
|
||||
@@ -1191,9 +1191,10 @@ struct ContextFormat2
|
||||
TRACE_COLLECT_GLYPHS (this);
|
||||
(this+coverage).add_coverage (c->input);
|
||||
|
||||
const ClassDef &class_def = this+classDef;
|
||||
struct ContextCollectGlyphsLookupContext lookup_context = {
|
||||
{collect_class},
|
||||
NULL
|
||||
&class_def
|
||||
};
|
||||
|
||||
unsigned int count = ruleSet.len;
|
||||
@@ -1750,9 +1751,15 @@ struct ChainContextFormat2
|
||||
TRACE_COLLECT_GLYPHS (this);
|
||||
(this+coverage).add_coverage (c->input);
|
||||
|
||||
const ClassDef &backtrack_class_def = this+backtrackClassDef;
|
||||
const ClassDef &input_class_def = this+inputClassDef;
|
||||
const ClassDef &lookahead_class_def = this+lookaheadClassDef;
|
||||
|
||||
struct ChainContextCollectGlyphsLookupContext lookup_context = {
|
||||
{collect_class},
|
||||
{NULL, NULL, NULL}
|
||||
{&backtrack_class_def,
|
||||
&input_class_def,
|
||||
&lookahead_class_def}
|
||||
};
|
||||
|
||||
unsigned int count = ruleSet.len;
|
||||
@@ -1764,13 +1771,17 @@ struct ChainContextFormat2
|
||||
{
|
||||
TRACE_WOULD_APPLY (this);
|
||||
|
||||
const ClassDef &backtrack_class_def = this+backtrackClassDef;
|
||||
const ClassDef &input_class_def = this+inputClassDef;
|
||||
const ClassDef &lookahead_class_def = this+lookaheadClassDef;
|
||||
|
||||
unsigned int index = input_class_def.get_class (c->glyphs[0]);
|
||||
const ChainRuleSet &rule_set = this+ruleSet[index];
|
||||
struct ChainContextApplyLookupContext lookup_context = {
|
||||
{match_class},
|
||||
{NULL, &input_class_def, NULL}
|
||||
{&backtrack_class_def,
|
||||
&input_class_def,
|
||||
&lookahead_class_def}
|
||||
};
|
||||
return TRACE_RETURN (rule_set.would_apply (c, lookup_context));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user