# voltLib: Read and write MS VOLT projects

- voltToFea: Convert MS VOLT to AFDKO feature files
  - Usage
  - Limitations
  - `MarkClassDefinition`
  - `Group`
  - `VoltToFea`
  - `main()`

fontTools.voltLib – a package for dealing with Visual OpenType Layout Tool (VOLT) files.

## ast

class fontTools.voltLib.ast.Pos(adv, dx, dy, adv_adjust_by, dx_adjust_by, dy_adjust_by)

  Bases: `NamedTuple`

  adv: int

    Alias for field number 0

  dx: int

    Alias for field number 1

  dy: int

    Alias for field number 2

  adv_adjust_by: dict

    Alias for field number 3

  dx_adjust_by: dict

    Alias for field number 4

  dy_adjust_by: dict

    Alias for field number 5

class fontTools.voltLib.ast.Element(location=None)

  Bases: `object`

  build(builder)

class fontTools.voltLib.ast.Statement(location=None)

  Bases: `Element`

class fontTools.voltLib.ast.Expression(location=None)

  Bases: `Element`

class fontTools.voltLib.ast.VoltFile

  Bases: `Statement`

  build(builder)

class fontTools.voltLib.ast.GlyphDefinition(name, gid, gunicode, gtype, components, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.GroupDefinition(name, enum, location=None)

  Bases: `Statement`

  glyphSet(groups=None)

class fontTools.voltLib.ast.GlyphName(glyph, location=None)

  Bases: `Expression`

  A single glyph name, such as cedilla.

  glyphSet()

class fontTools.voltLib.ast.Enum(enum, location=None)

  Bases: `Expression`

  An enum

  glyphSet(groups=None)

class fontTools.voltLib.ast.GroupName(group, parser, location=None)

  Bases: `Expression`

  A glyph group

  glyphSet(groups=None)

class fontTools.voltLib.ast.Range(start, end, parser, location=None)

  Bases: `Expression`

  A glyph range

  glyphSet()

class fontTools.voltLib.ast.ScriptDefinition(name, tag, langs, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.LangSysDefinition(name, tag, features, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.FeatureDefinition(name, tag, lookups, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.LookupDefinition(name, process_base, process_marks, mark_glyph_set, direction, reversal, comments, context, sub, pos, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.SubstitutionDefinition(mapping, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.SubstitutionSingleDefinition(mapping, location=None)

  Bases: `SubstitutionDefinition`

class fontTools.voltLib.ast.SubstitutionMultipleDefinition(mapping, location=None)

  Bases: `SubstitutionDefinition`

class fontTools.voltLib.ast.SubstitutionLigatureDefinition(mapping, location=None)

  Bases: `SubstitutionDefinition`

class fontTools.voltLib.ast.SubstitutionReverseChainingSingleDefinition(mapping, location=None)

  Bases: `SubstitutionDefinition`

class fontTools.voltLib.ast.PositionAttachDefinition(coverage, coverage_to, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.PositionAttachCursiveDefinition(coverages_exit, coverages_enter, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.PositionAdjustPairDefinition(coverages_1, coverages_2, adjust_pair, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.PositionAdjustSingleDefinition(adjust_single, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.ContextDefinition(ex_or_in, left=None, right=None, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.AnchorDefinition(name, gid, glyph_name, component, locked, pos, location=None)

  Bases: `Statement`

class fontTools.voltLib.ast.SettingDefinition(name, value, location=None)

  Bases: `Statement`

## error

exception fontTools.voltLib.error.VoltLibError(message, location)

  Bases: `Exception`

## lexer

class fontTools.voltLib.lexer.Lexer(text, filename)

  Bases: `object`

  NUMBER = 'NUMBER'
  STRING = 'STRING'
  NAME = 'NAME'
  NEWLINE = 'NEWLINE'
  CHAR_WHITESPACE_ = ' \t'
  CHAR_NEWLINE_ = '\r\n'
  CHAR_DIGIT_ = '0123456789'
  CHAR_UC_LETTER_ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  CHAR_LC_LETTER_ = 'abcdefghijklmnopqrstuvwxyz'
  CHAR_UNDERSCORE_ = '_'
  CHAR_PERIOD_ = '.'
  CHAR_NAME_START_ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._'
  CHAR_NAME_CONTINUATION_ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._0123456789'
  next()
  location_()
  next_()
  scan_over_(valid)
  scan_until_(stop_at)

## parser

class fontTools.voltLib.parser.Parser(path)

  Bases: `object`

  make_lexer_(file_or_path)
  parse()
  parse_def_glyph_()
  parse_def_group_()
  parse_def_script_()
  parse_langsys_()
  parse_feature_()
  parse_def_lookup_()
  parse_context_()
  parse_substitution_(reversal)
  parse_position_()
  parse_attach_()
  parse_attach_cursive_()
  parse_adjust_pair_()
  parse_adjust_single_()
  parse_def_anchor_()
  parse_adjust_by_()
  parse_pos_()
  parse_unicode_values_()
  parse_enum_()
  parse_coverage_()
  resolve_group(group_name)
  glyph_range(start, end)
  parse_ppem_()
  parse_noarg_option_()
  parse_cmap_format()
  is_cur_keyword_(k)
  expect_string_()
  expect_keyword_(keyword)
  expect_name_()
  expect_number_()
  advance_lexer_()

class fontTools.voltLib.parser.SymbolTable

  Bases: `object`

  enter_scope()
  exit_scope()
  define(name, item)
  resolve(name, case_insensitive=True)

class fontTools.voltLib.parser.OrderedSymbolTable

  Bases: `SymbolTable`

  enter_scope()
  resolve(name, case_insensitive=False)
  range(start, end)