# ttGlyphSet: GlyphSets returned by a TTFont object

## Overview

The `fontTools.ttLib.ttGlyphSet` module is a helper for `fontTools.ttLib`.

Most users will not need to access this module directly. Instead, the glyphs in a font are accessible as a `.glyphSet` dictionary in a `TTFont` instance.

GlyphSets returned by a TTFont.

class fontTools.ttLib.ttGlyphSet._TTGlyphSet(font, location, glyphsMapping, *, recalcBounds=True)

  Bases: `Mapping`

  Generic dict-like GlyphSet class that pulls metrics from hmtx and glyph shape from TrueType or CFF.

  pushLocation(location, reset: bool)
  pushDepth()
  has_key(glyphName)
  _abc_impl = <_abc._abc_data object>

class fontTools.ttLib.ttGlyphSet._TTGlyphSetGlyf(font, location, recalcBounds=True)

  Bases: `_TTGlyphSet`

  _abc_impl = <_abc._abc_data object>

class fontTools.ttLib.ttGlyphSet._TTGlyphSetCFF(font, location)

  Bases: `_TTGlyphSet`

  setLocation(location)
  pushLocation(location, reset: bool)
  _abc_impl = <_abc._abc_data object>

class fontTools.ttLib.ttGlyphSet._TTGlyphSetVARC(font, location, glyphSet)

  Bases: `_TTGlyphSet`

  _abc_impl = <_abc._abc_data object>

class fontTools.ttLib.ttGlyphSet._TTGlyph(glyphSet, glyphName, *, recalcBounds=True)

  Bases: `ABC`

  Glyph object that supports the Pen protocol, meaning that it has .draw() and .drawPoints() methods that take a pen object as their only argument. Additionally there are ‘width’ and ‘lsb’ attributes, read from the ‘hmtx’ table.

  If the font contains a ‘vmtx’ table, there will also be ‘height’ and ‘tsb’ attributes.

  abstractmethod draw(pen)

    Draw the glyph onto `pen`. See fontTools.pens.basePen for details how that works.

  drawPoints(pen)

    Draw the glyph onto `pen`. See fontTools.pens.pointPen for details how that works.

  _abc_impl = <_abc._abc_data object>

class fontTools.ttLib.ttGlyphSet._TTGlyphGlyf(glyphSet, glyphName, *, recalcBounds=True)

  Bases: `_TTGlyph`

  draw(pen)

    Draw the glyph onto `pen`. See fontTools.pens.basePen for details how that works.

  drawPoints(pen)

    Draw the glyph onto `pen`. See fontTools.pens.pointPen for details how that works.

  _getGlyphAndOffset()
  _getGlyphInstance()
  _abc_impl = <_abc._abc_data object>

class fontTools.ttLib.ttGlyphSet._TTGlyphCFF(glyphSet, glyphName, *, recalcBounds=True)

  Bases: `_TTGlyph`

  draw(pen)

    Draw the glyph onto `pen`. See fontTools.pens.basePen for details how that works.

  _abc_impl = <_abc._abc_data object>

fontTools.ttLib.ttGlyphSet._evaluateCondition(condition, fvarAxes, location, instancer)

class fontTools.ttLib.ttGlyphSet._TTGlyphVARC(glyphSet, glyphName, *, recalcBounds=True)

  Bases: `_TTGlyph`

  _draw(pen, isPointPen)

    Draw the glyph onto `pen`. See fontTools.pens.basePen for details how that works.

  draw(pen)
  drawPoints(pen)
  _abc_impl = <_abc._abc_data object>

fontTools.ttLib.ttGlyphSet._setCoordinates(glyph, coord, glyfTable, *, recalcBounds=True)

class fontTools.ttLib.ttGlyphSet.LerpGlyphSet(glyphset1, glyphset2, factor=0.5)

  Bases: `Mapping`

  A glyphset that interpolates between two other glyphsets.

  Factor is typically between 0 and 1. 0 means the first glyphset, 1 means the second glyphset, and 0.5 means the average of the two glyphsets. Other values are possible, and can be useful to extrapolate. Defaults to 0.5.

  _abc_impl = <_abc._abc_data object>

class fontTools.ttLib.ttGlyphSet.LerpGlyph(glyphname, glyphset)

  Bases: `object`

  draw(pen)