114 lines
3.3 KiB
Python
Raw Normal View History

2015-09-30 09:50:12 +01:00
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)
2015-12-05 18:59:27 +00:00
2015-09-30 09:50:12 +01:00
class GlyphDefinition(ast.Statement):
def __init__(self, location, name, gid, gunicode, gtype, components):
2015-12-05 18:59:27 +00:00
ast.Statement.__init__(self, location)
2015-09-30 09:50:12 +01:00
self.name = name
self.id = gid
self.unicode = gunicode
self.type = gtype
self.components = components
2015-09-30 14:06:51 +01:00
2015-12-05 18:59:27 +00:00
2015-09-30 14:06:51 +01:00
class GroupDefinition(ast.Statement):
def __init__(self, location, name, enum):
2015-12-05 18:59:27 +00:00
ast.Statement.__init__(self, location)
2015-09-30 14:06:51 +01:00
self.name = name
self.enum = enum
2015-10-04 08:39:11 +02:00
2015-12-05 18:59:27 +00:00
2015-10-04 08:39:11 +02:00
class ScriptDefinition(ast.Statement):
def __init__(self, location, name, tag, langs):
2015-12-05 18:59:27 +00:00
ast.Statement.__init__(self, location)
2015-10-04 08:39:11 +02:00
self.name = name
self.tag = tag
self.langs = langs
2015-12-05 18:59:27 +00:00
2015-10-04 08:39:11 +02:00
class LangSysDefinition(ast.Statement):
2015-10-01 00:22:23 +01:00
def __init__(self, location, name, tag, features):
2015-12-05 18:59:27 +00:00
ast.Statement.__init__(self, location)
2015-10-04 08:39:11 +02:00
self.name = name
self.tag = tag
2015-10-01 00:22:23 +01:00
self.features = features
2015-12-05 18:59:27 +00:00
2015-10-01 00:22:23 +01:00
class FeatureDefinition(ast.Statement):
def __init__(self, location, name, tag, lookups):
2015-12-05 18:59:27 +00:00
ast.Statement.__init__(self, location)
2015-10-01 00:22:23 +01:00
self.name = name
self.tag = tag
self.lookups = lookups
2015-12-05 18:59:27 +00:00
class LookupDefinition(ast.Statement):
2015-12-05 18:59:27 +00:00
def __init__(self, location, name, base, marks, process_marks, all_flag,
direction, comments, context, sub, pos):
ast.Statement.__init__(self, location)
self.name = name
self.base = base
self.marks = marks
self.process_marks = process_marks
self.all = all_flag
self.direction = direction
self.comments = comments
self.context = context
self.sub = sub
self.pos = pos
2015-12-05 18:59:27 +00:00
class SubstitutionDefinition(ast.Statement):
def __init__(self, location, src, dest):
ast.Statement.__init__(self, location)
self.mapping = zip(src, dest)
2015-12-05 18:59:27 +00:00
2015-10-07 22:18:05 +01:00
class PositionAttachDefinition(ast.Statement):
def __init__(self, location, coverage, coverage_to):
2015-10-07 22:18:05 +01:00
ast.Statement.__init__(self, location)
self.coverage = coverage
self.coverage_to = coverage_to
2015-12-05 18:59:27 +00:00
2015-10-07 23:16:55 +01:00
class PositionAdjustPairDefinition(ast.Statement):
def __init__(self, location, coverages_1, coverages_2, adjust):
ast.Statement.__init__(self, location)
self.coverages_1 = coverages_1
self.coverages_2 = coverages_2
self.adjust = adjust
2015-12-05 18:59:27 +00:00
class ContextDefinition(ast.Statement):
def __init__(self, location, ex_or_in, left=[], right=[]):
ast.Statement.__init__(self, location)
self.ex_or_in = ex_or_in
self.left = left
self.right = right
2015-10-07 22:18:05 +01:00
2015-12-05 18:59:27 +00:00
2015-10-07 22:18:05 +01:00
class AnchorDefinition(ast.Statement):
2015-12-05 18:59:27 +00:00
def __init__(self, location, name, gid, glyph_name, component, locked,
pos):
2015-10-07 22:18:05 +01:00
ast.Statement.__init__(self, location)
self.name = name
self.gid = gid
self.glyph_name = glyph_name
self.component = component
self.locked = locked
self.pos = pos
2015-12-05 18:59:27 +00:00
class SettingDefinition(ast.Statement):
def __init__(self, location, name, value):
ast.Statement.__init__(self, location)
self.name = name
self.value = value