File: Positioning.py

package info (click to toggle)
python-fontfeatures 1.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,096 kB
  • sloc: python: 9,112; makefile: 22
file content (13 lines) | stat: -rw-r--r-- 371 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
"""ttLib.Positioning: Converting Positioning rules to TrueType."""


def lookup_type(self):
    """Mixin to determine the GPOS lookup type of a fontFeatures.Positioning object

    Returns: integer GPOS lookup type."""
    if not self.has_context:
        if len(self.glyphs) == 1:
            return 1
        if len(self.glyphs) == 2:
            return 2
    return 8