47 lines
1.5 KiB
Python
47 lines
1.5 KiB
Python
from __future__ import print_function, division, absolute_import
|
|
from __future__ import unicode_literals
|
|
import fontTools.feaLib.ast as ast
|
|
|
|
|
|
class VoltFile(ast.Block):
|
|
def __init__(self):
|
|
ast.Block.__init__(self, location=None)
|
|
|
|
class GlyphDefinition(ast.Statement):
|
|
def __init__(self, location, name, gid, gunicode, gtype, components):
|
|
ast.Statement.__init__(self,location)
|
|
self.name = name
|
|
self.id = gid
|
|
self.unicode = gunicode
|
|
self.type = gtype
|
|
self.components = components
|
|
|
|
class GroupDefinition(ast.Statement):
|
|
def __init__(self, location, name, glyphs, groups, ranges):
|
|
ast.Statement.__init__(self,location)
|
|
self.name = name
|
|
self.enum = {"glyphs": glyphs,
|
|
"groups": groups,
|
|
"ranges": ranges}
|
|
|
|
class ScriptDefinition(ast.Statement):
|
|
def __init__(self, location, name, tag, langs):
|
|
ast.Statement.__init__(self,location)
|
|
self.name = name
|
|
self.tag = tag
|
|
self.langs = langs
|
|
|
|
class LangSysDefinition(ast.Statement):
|
|
def __init__(self, location, name, tag, features):
|
|
ast.Statement.__init__(self,location)
|
|
self.name = name
|
|
self.tag = tag
|
|
self.features = features
|
|
|
|
class FeatureDefinition(ast.Statement):
|
|
def __init__(self, location, name, tag, lookups):
|
|
ast.Statement.__init__(self,location)
|
|
self.name = name
|
|
self.tag = tag
|
|
self.lookups = lookups
|