Skip to content

fontgate.fgFont

fgFont

Font representation

Constructors: fgFont() - create new empty font fgFont('font_name') - - create new empty font with name 'font_name'

Native bases: object

Captured native MRO: fgFont, object

Native new allocation evidence (not an init overload): (args, *kwargs) Create and return a new object. See help(type) for accurate signature.

Supplemental documentation: A font data object. The captured declaration exposes glyphs, info, features, kerning and axes. Access naming information through info; the captured fgFont has no family attribute. Consult each native member declaration for its return type and calling convention.

Source: generated/fontgate.py: fgFont captured declaration

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__init__ function (self, /, *args: Any, **kwargs: Any) -> None Initialize self. (shared captured text)
addGlyph function (self, arg0: fgGlyph) -> fgGlyph
appendFeatures function (self) -> int
averageHeight function (self) -> float
averageWidth function (self) -> float
axes attribute Any (fgAxes) axes info
boundingBox function (self, arg0: fgMatrix) -> fgRect
calculateSafeZones function (self, *args: Any, **kwargs: Any) -> Any
checkMaps function (self) -> Any
clearGlyphs function (self) -> Any Remove all glyphs
clearMaps function (self) -> Any Force clear all font internal caches
coding attribute Any (fgCoding) encoding info
copyFrom function (self, sourceFont: fgFont) -> Any Copy all data and glyphs from source font
createGlyph function (self, clearExisting: Any=...) -> fgGlyph
dropHintingTables function (self) -> Any
dropLayoutTables function (self) -> Any
features attribute Any (fgOTLayout) features data
fixOrdering function (self, sortMethod: Any=...) -> bool Bool fixOrdering(float upm[, sortMethod='sortUnicode']) - sort glyphs by selected method.
glyphs attribute Any ([fgGlyph]) font glyphs list
groups attribute Any (fgGroups) glyph groups list
guides attribute Any (fgGuides) guides list
hasColors function (self) -> bool
hasPictures function (self) -> bool
has_key function (self, *args: Any, **kwargs: Any) -> Any Bool has_key('name') - return true if font contains glyph with name 'name'
hinting attribute Any (fgFontHinting) hinting info
hints attribute Any (fgHints) hints list for font 'Body' layer
id attribute Any (long) package id
info attribute Any (fgFontInfo) font info data
items function (self) -> Any [('name', fgGlyph)] items() - returns a list of font's ('name', fgGlyph) tuple pairs
kerning attribute Any (fgKerning) kerning data
keys function (self) -> Any ['names'] keys() - return list of names of all glyphs in the font
killUnicode function (self, unicode: Any) -> Any Remove selected unicode from all glyph unicodes lists
lib attribute Any (fgLib) additional font data
master attribute Any (fgLayer) font master layer
metricsClasses attribute Any (fgMetricsClasses) list of metrics classes
path attribute Any (string) path and font file name
rebuildMaps function (self) -> Any Force clear and rebuild all font internal caches
removeGlyph function (self, *args: Any, **kwargs: Any) -> Any Bool/Nothing removeGlyph('name'/unicode) - remove glyph selected by 'name' or unicode (int)
save function (self, save_vfb: Any=...) -> Any Save font in UFO or VFB format
scale function (self, arg0: float) -> Any Scale font UPM
shapes attribute Any (fgMapShapes) font shapes map
sortGlyphs function (self, sortMethod: Any) -> Any Sort glyphs. sortMethod: 'sortNone'/'sortName'/'sortUnicode'/'sortIndex'/'sortIndexReverse'
tables attribute Any (fgMapBytes) raw OT tables data
translatedNames attribute Any ([tuples]) raw style->names.translated data
update function (self) -> Any Force rebuild font chaches and request font update
values function (self) -> Any [fgGlyph] values() - returns list of font's fgGlyph