glyf: Glyph Data

class fontTools.ttLib.tables._g_l_y_f.table__g_l_y_f(tag=None)[source]
getCoordinatesAndControls(glyphName, ttFont, defaultVerticalOrigin=None)[source]

Old public name for self._getCoordinatesAndControls(). See: https://github.com/fonttools/fonttools/pull/2266

getPhantomPoints(glyphName, ttFont, defaultVerticalOrigin=None)[source]

Old public name for self._getPhantomPoints(). See: https://github.com/fonttools/fonttools/pull/2266

setCoordinates(glyphName, ttFont)[source]

Old public name for self._setCoordinates(). See: https://github.com/fonttools/fonttools/pull/2266

class fontTools.ttLib.tables._g_l_y_f.Glyph(data=b'')[source]
drawPoints(pen, glyfTable, offset=0)[source]

Draw the glyph using the supplied pointPen. Opposed to Glyph.draw(), this will not change the point indices.

isComposite()[source]

Can be called on compact or expanded glyph.

trim(remove_hinting=False)[source]

Remove padding and, if requested, hinting, from a glyph. This works on both expanded and compacted glyphs, without expanding it.

class fontTools.ttLib.tables._g_l_y_f.GlyphComponent[source]
getComponentInfo()[source]

Return the base glyph name and a transform.

class fontTools.ttLib.tables._g_l_y_f.GlyphCoordinates(iterable=[])[source]
scale(p)[source]
>>> GlyphCoordinates([(1,2)]).scale((.5,0))
transform(t)[source]
>>> GlyphCoordinates([(1,2)]).transform(((.5,0),(.2,.5)))
translate(p)[source]
>>> GlyphCoordinates([(1,2)]).translate((.5,0))