File: RoutineReference.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 (14 lines) | stat: -rw-r--r-- 391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""Routines for converting RoutineReference objects to and from Adobe FEA."""
import fontTools.feaLib.ast as feaast


def feaPreamble(self, ff):
    return []


def asFeaAST(self, expand=False):
    # if self.routine.usecount == 1:
    #     return self.routine.asFeaAST()
    f = feaast.Block()
    f.statements.append(feaast.LookupReferenceStatement(self.routine.asFeaAST()))
    return f