Lib/fontFeatures/ttLib/Positioning.py
raw| 1 | """ttLib.Positioning: Converting Positioning rules to TrueType.""" |
| 2 | |
| 3 | |
| 4 | def lookup_type(self): |
| 5 | """Mixin to determine the GPOS lookup type of a fontFeatures.Positioning object |
| 6 | |
| 7 | Returns: integer GPOS lookup type.""" |
| 8 | if not self.has_context: |
| 9 | if len(self.glyphs) == 1: |
| 10 | return 1 |
| 11 | if len(self.glyphs) == 2: |
| 12 | return 2 |
| 13 | return 8 |