Bitmap-data helper modules

Overview:

The modules documented on this page are helpers for fontTools.ttLib that implement lower-level support for various table converters that need to interact with bitmapped data. The BitmapGlyphMetrics module is used for the EBDT/EBLC and CBDT/CBLC tables, and sbixGlyph and sbixStrike are used for the sbix table.

fontTools.ttLib.tables.BitmapGlyphMetrics

class fontTools.ttLib.tables.BitmapGlyphMetrics.BitmapGlyphMetrics[source]

Bases: object

toXML(writer, ttFont)[source]
fromXML(name, attrs, content, ttFont)[source]
class fontTools.ttLib.tables.BitmapGlyphMetrics.BigGlyphMetrics[source]

Bases: BitmapGlyphMetrics

binaryFormat = '\n  > # big endian\n  height:       B\n  width:        B\n  horiBearingX: b\n  horiBearingY: b\n  horiAdvance:  B\n  vertBearingX: b\n  vertBearingY: b\n  vertAdvance:  B\n'
class fontTools.ttLib.tables.BitmapGlyphMetrics.SmallGlyphMetrics[source]

Bases: BitmapGlyphMetrics

binaryFormat = '\n  > # big endian\n  height:   B\n  width:    B\n  BearingX: b\n  BearingY: b\n  Advance:  B\n'

fontTools.ttLib.tables.sbixGlyph

class fontTools.ttLib.tables.sbixGlyph.Glyph(glyphName=None, referenceGlyphName=None, originOffsetX=0, originOffsetY=0, graphicType=None, imageData=None, rawdata=None, gid=0)[source]

Bases: object

is_reference_type()[source]

Returns True if this glyph is a reference to another glyph’s image data.

decompile(ttFont)[source]
compile(ttFont)[source]
toXML(xmlWriter, ttFont)[source]
fromXML(name, attrs, content, ttFont)[source]

fontTools.ttLib.tables.sbixStrike

class fontTools.ttLib.tables.sbixStrike.Strike(rawdata=None, ppem=0, resolution=72)[source]

Bases: object

decompile(ttFont)[source]
compile(ttFont)[source]
toXML(xmlWriter, ttFont)[source]
fromXML(name, attrs, content, ttFont)[source]