To add support for ReverseChainSingleSubst (GSUB lookup of type 8, especially
introduced for Urdu), you have to make two fixes:
1) in file otTables.py, replace:
lookupTypes = {
'GSUB': {
1: SingleSubst,
2: MultipleSubst,
3: AlternateSubst,
4: LigatureSubst,
5: ContextSubst,
6: ChainContextSubst,
7: ExtensionSubst,
},
by:
lookupTypes = {
'GSUB': {
1: SingleSubst,
2: MultipleSubst,
3: AlternateSubst,
4: LigatureSubst,
5: ContextSubst,
6: ChainContextSubst,
7: ExtensionSubst,
8: ReverseChainSingleSubst,
},
2) In file otData.py add:
('ReverseChainSingleSubstFormat1', [
('uint16', 'SubstFormat', None, None, 'Format identifier-format = 1'),
('Offset', 'Coverage', None, 0, 'Offset to Coverage table - from
beginning of Substitution table'),
('uint16', 'BacktrackGlyphCount', None, None, 'Number of glyphs in the
backtracking sequence'),
('Offset', 'BacktrackCoverage', 'BacktrackGlyphCount', 0, 'Array of
offsets to coverage tables in backtracking sequence, in glyph sequence
order'),
('uint16', 'LookAheadGlyphCount', None, None, 'Number of glyphs in
lookahead sequence'),
('Offset', 'LookAheadCoverage', 'LookAheadGlyphCount', 0, 'Array of
offsets to coverage tables in lookahead sequence, in glyph sequence order'),
('uint16', 'GlyphCount', None, None, 'Number of GlyphIDs in the
Substitute array'),
('GlyphID', 'Substitute', 'GlyphCount', 0, 'Array of substitute
GlyphIDs-ordered by Coverage index'),
]),
just before:
#
# gdef (generated from gdef.htm)
#
+--------------------------------------------------------------------+
| Yannis Haralambous, Ph.D. yannis.haralambous@... |
| Professor http://omega.enstb.org/yannis |
| Tel. +33 (0)2.29.00.14.27 |
| Fax +33 (0)2.29.00.12.82 |
| Computer Science Department |
| Ecole Nationale Superieure des Telecommunications de Bretagne |
| Technopole de Brest Iroise, CS 83818, 29238 Brest CEDEX 3, France |
+--------------------------------------------------------------------+
...pour distinguer l'exterieur d'un aquarium,
mieux vaut n'etre pas poisson
...the ball I threw while playing in the park
has not yet reached the ground
|