Fix OS/2.usMaxContext for reverse GSUB rules

This commit is contained in:
David Corbett 2024-06-16 18:43:13 -04:00 committed by Behdad Esfahbod
parent 4b030d2db8
commit aa390ec98b
2 changed files with 2 additions and 2 deletions

View File

@ -92,5 +92,5 @@ def maxCtxContextualRule(maxCtx, st, chain):
if not chain:
return max(maxCtx, st.GlyphCount)
elif chain == "Reverse":
return max(maxCtx, st.GlyphCount + st.LookAheadGlyphCount)
return max(maxCtx, 1 + st.LookAheadGlyphCount)
return max(maxCtx, st.InputGlyphCount + st.LookAheadGlyphCount)

View File

@ -39,8 +39,8 @@ def test_max_ctx_calc_features():
rsub a' by b;
rsub a b' by c;
rsub a b' c by A;
rsub [a b] [a b c]' [a b] by B;
rsub [a b] c' by A;
rsub [a b] c' [a b] by B;
lookup GSUB_EXT;
} sub1;