fontgate.fgGlyph
fgGlyph
Glyph representation
Constructors: fgGlyph() - default fgGlyph(fgGlyph) - copy fgGlyph('name') - create by name
Native bases: object
Captured native MRO: fgGlyph, 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 glyph data object. The captured declaration exposes name, unicode, unicodes, width, anchors and components. Outlines are associated with layer data rather than a contours attribute.
Example::
print(glyph.name)
print(glyph.unicode)
print(glyph.width)
Source: generated/fontgate.py: fgGlyph 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) |
activeLayer |
attribute | Any |
(fgLayer) active layer or Nothing if not found |
addUnicode |
function | (self, unicode: Any) -> Any |
Add unicode to glyph |
anchors |
attribute | Any |
([ fgAnchor ]) anchor's list |
append |
function | (self, mtx: Any=...) -> Any |
Append(fgGlyph[, mtx=fgMatrix()]) - append contours of source glyph to current glyph |
bodyLayer |
attribute | Any |
(fgLayer) layer 'Body' or Nothing if not found |
bodyLayerStrict |
attribute | Any |
(fgLayer) layer 'Body' (create one if not found) |
box |
attribute | Any |
(fgRect) glyph bounding box (int values) |
carets |
attribute | Any |
([ fgCaret ]) caret's list |
clear |
function | (self, contours: Any=True, components: Any=True, anchors: Any=True, guides: Any=True, hints: Any=True) -> Any |
Clear glyph's data |
components |
attribute | Any |
([ fgComponent ]) component's list |
countPictures |
function | (self) -> int |
Int countPictures() - return count of glyph pictures |
createContour |
function | (self) -> fgContour |
FgContour createContour() - create new contour |
createData |
function | (self, *args: Any, **kwargs: Any) -> Any |
(variable type) createData(GlyphDataType) - create glyph data, specified by GlyphDataType. |
decompose |
function | (self) -> bool |
Bool decompose() - decompose glyph |
deleteContour |
function | (self, contourIndex: Any) -> Any |
Delete contour by index |
dict |
attribute | Any |
(fgGlyphDict) glyph's data dictionary |
draw |
function | (self, *args: Any, **kwargs: Any) -> Any |
Draw contour by penObject (like fgPen) with transform matrix fgMatrix |
fbox |
attribute | Any |
(fgRect) glyph bounding box (int/float values) |
fgData |
function | (self) -> Any |
FgFontGateData/Nothing fgData() - get dtFontGate data if it's exist |
fgDataCreate |
function | (self) -> fgFontGateData |
|
fixComposites |
function | (self, fixRotation: Any=False) -> bool |
|
getData |
function | (self, *args: Any, **kwargs: Any) -> Any |
(variable type) getData([GlyphDataType='dtFontGate']) - get glyph data, specified by GlyphDataType. |
getPen |
function | (self) -> fgPen |
FgPen getPen() - create new pen object |
guides |
attribute | Any |
([ fgGuide ]) guide's list |
hasBody |
function | (self) -> bool |
Bool hasBody() - return True if glyph has contours or picture |
hasColors |
function | (self) -> bool |
Bool hasColors() - return True if glyph has color pictures |
hasData |
function | (self, GlyphDataType: Any) -> bool |
Bool hasData(GlyphDataType) - return True if glyph data, specified by GlyphDataType, is exist. |
hasHints |
function | (self) -> bool |
Bool hasHints() - return True if glyph has hints |
hasPictures |
function | (self) -> bool |
Bool hasPictures() - return True if glyph has pictures |
hasUnicode |
function | (self, unicode: Any) -> bool |
Bool hasUnicode(unicode) - return True if glyph has specified unicode |
height |
attribute | Any |
(float) advancedHeight |
hints |
attribute | Any |
([ fgHint ]) hint's list |
id |
attribute | Any |
(long) glyph ID |
image |
attribute | Any |
(fgBitmap) first glyph image |
index |
attribute | Any |
(int) glyph index |
keepData |
function | (self, GlyphDataType: Any) -> bool |
Bool keepData(GlyphDataType) - remove all glyph data, except one specified by GlyphDataType. |
kerningLeft |
attribute | Any |
|
kerningRight |
attribute | Any |
|
killData |
function | (self, GlyphDataType: Any) -> bool |
Bool killData(GlyphDataType) - remove glyph data, specified by GlyphDataType. |
killUnicode |
function | (self, unicode: Any) -> Any |
Remove unicode from glyph |
layer |
attribute | Any |
(fgLayer) working layer (if present) or None. |
layerName |
attribute | Any |
(string) name of the working layer name |
layers |
attribute | Any |
([ fgLayer ]) layer's list |
leftMargin |
attribute | Any |
|
lib |
attribute | Any |
(fgLib) additional glyph's data |
mark |
attribute | Any |
(int) glyph's mark value |
mask |
attribute | Any |
(fgGlyph/Nothing) mask glyph |
metrics |
attribute | Any |
(fgPoint) advancedWidth and advancedHeight |
modified |
function | (self, GlyphDataType: Any) -> Any |
Inform that glyph data GlyphDataType has been modified. |
move |
function | (self, dx: Any, dy: Any) -> Any |
|
name |
attribute | Any |
(string) glyph name |
note |
attribute | Any |
|
otInfo |
attribute | Any |
|
parent |
attribute | Any |
(fgFont) parent font for glyph |
removeOverlap |
function | (self) -> Any |
|
rightMargin |
attribute | Any |
|
setData |
function | (self, object: Any) -> Any |
Set glyph data |
setUnicode |
function | (self, unicode: Any) -> Any |
Assign unicode to glyph |
transform |
function | (self, arg0: fgMatrix) -> Any |
Transform glyph by fgMatrix data |
ttData |
function | (self) -> Any |
FgTrueTypeData/Nothing ttData() - get dtTrueType data if it's exist |
ttDataCreate |
function | (self) -> fgTrueTypeData |
|
unicode |
attribute | Any |
(int/Nothing) first glyph's unicode or Nothing if unicodes aren't defined |
unicodes |
attribute | Any |
([ int ]) unicode's list |
update |
function | (self) -> Any |
|
vsb |
attribute | Any |
(float) vsb |
width |
attribute | Any |
(float) advancedWidth |