Generate reversed GSUB sequences for subregion flags too.
Since subregion flag sequences consist of BN and ON they can be impacted by bidi, and once again we have the problem that these are processed in visual order so we need GSUB rules such that we can handle them in either direction. All subregion flag sequences contain U+E007F, so we use that as a trigger for adding the reversed sequence. We also need to handle emitting the missing flag glyph for the reversed sequences. And we also want to strip out tag glyphs when the context is reversed. This means the chaining context should include 'E007F' as well.pull/92/head
parent
d270ecad99
commit
58097d9d4c
|
@ -443,6 +443,7 @@
|
|||
</Coverage>
|
||||
<BacktrackClassDef Format="1">
|
||||
<ClassDef glyph="u1F3F4" class="1"/>
|
||||
<ClassDef glyph="uE007F" class="1"/>
|
||||
</BacktrackClassDef>
|
||||
<InputClassDef Format="2">
|
||||
<ClassDef glyph="uE0030" class="2"/>
|
||||
|
@ -510,6 +511,9 @@
|
|||
<LigatureSet glyph="u1F3F4">
|
||||
<Ligature components="uE007F" glyph="uFE82B"/>
|
||||
</LigatureSet>
|
||||
<LigatureSet glyph="uE007F">
|
||||
<Ligature components="u1F3F4" glyph="uFE82B"/>
|
||||
</LigatureSet>
|
||||
</LigatureSubst>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
|
|
|
@ -178,7 +178,7 @@ def add_lig_sequence(ligatures, seq, n):
|
|||
print 'lig sequence %s, replace %s with %s' % (
|
||||
tseq, ligatures[tseq], n)
|
||||
ligatures[tseq] = n
|
||||
if 'u200D' in seq:
|
||||
if 'u200D' in seq or 'uE007F' in seq:
|
||||
rev_seq = seq[:]
|
||||
rev_seq.reverse()
|
||||
for i in xrange(1, len(rev_seq)):
|
||||
|
|
Loading…
Reference in New Issue