Glyph

Must Override

BaseGlyph._addImage(data, transformation=None, color=None)[source]

data will be raw, unnormalized image data. Each environment may have different possible formats, so this is unspecified.

transformation will be a valid transformation matrix.

color will be a color tuple or None.

This must return an Image object. Assigning it to the glyph will be handled by the base class.

Subclasses must override this method.

BaseGlyph._autoUnicodes()[source]

Subclasses must override this method.

BaseGlyph._clearImage(**kwargs)[source]

Subclasses must override this method.

BaseGlyph._getAnchor(index, **kwargs)[source]

This must return a wrapped anchor.

index will be a valid index.

Subclasses must override this method.

BaseGlyph._getComponent(index, **kwargs)[source]

This must return a wrapped component.

index will be a valid index.

Subclasses must override this method.

BaseGlyph._getContour(index, **kwargs)[source]

This must return a wrapped contour.

index will be a valid index.

Subclasses must override this method.

BaseGlyph._getGuideline(index, **kwargs)[source]

This must return a wrapped guideline.

index will be a valid index.

Subclasses must override this method.

BaseGlyph._get_height()[source]

This must return an int or float.

Subclasses must override this method.

BaseGlyph._get_image()[source]

Subclasses must override this method.

BaseGlyph._get_lib()[source]

Subclasses must override this method.

BaseGlyph._get_markColor()[source]

Return the mark color value as a color tuple or None.

Subclasses must override this method.

BaseGlyph._get_name()[source]

Get the name of the glyph. This must return a unicode string.

Subclasses must override this method.

BaseGlyph._get_note()[source]

Subclasses must override this method.

BaseGlyph._get_unicodes()[source]

Get the unicodes assigned to the glyph. This must return a tuple of zero or more integers.

Subclasses must override this method.

BaseGlyph._get_width()[source]

This must return an int or float.

Subclasses must override this method.

BaseGlyph._lenAnchors(**kwargs)[source]

This must return an integer indicating the number of anchors in the glyph.

Subclasses must override this method.

BaseGlyph._lenComponents(**kwargs)[source]

This must return an integer indicating the number of components in the glyph.

Subclasses must override this method.

BaseGlyph._lenContours(**kwargs)[source]

This must return an integer.

Subclasses must override this method.

BaseGlyph._lenGuidelines(**kwargs)[source]

This must return an integer indicating the number of guidelines in the glyph.

Subclasses must override this method.

BaseGlyph._newLayer(name, **kwargs)[source]

name will be a string representing a valid layer name. The name will have been tested to make sure that no layer in the glyph already has the name.

This must returned the new glyph.

Subclasses must override this method.

BaseGlyph._removeAnchor(index, **kwargs)[source]

index will be a valid index.

Subclasses must override this method.

BaseGlyph._removeComponent(index, **kwargs)[source]

index will be a valid index.

Subclasses must override this method.

BaseGlyph._removeContour(index, **kwargs)[source]

index will be a valid index.

Subclasses must override this method.

BaseGlyph._removeGuideline(index, **kwargs)[source]

index will be a valid index.

Subclasses must override this method.

BaseGlyph._removeOverlap()[source]

Subclasses must implement this method.

BaseGlyph._set_height(value)[source]

value will be an int or float.

Subclasses must override this method.

BaseGlyph._set_markColor(value)[source]

value will be a color tuple or None.

Subclasses must override this method.

BaseGlyph._set_name(value)[source]

Set the name of the glyph. This will be a unicode string.

Subclasses must override this method.

BaseGlyph._set_note(value)[source]

Subclasses must override this method.

BaseGlyph._set_unicodes(value)[source]

Assign the unicodes to the glyph. This will be a list of zero or more integers.

Subclasses must override this method.

BaseGlyph._set_width(value)[source]

value will be an int or float.

Subclasses must override this method.

May Override

BaseGlyph.__add__(other)[source]

Subclasses may override this method.

BaseGlyph.__div__(factor)

Subclasses may override this method.

BaseGlyph.__mul__(factor)[source]

Subclasses may override this method.

BaseGlyph.__rmul__(factor)

Subclasses may override this method.

BaseGlyph.__sub__(other)[source]

Subclasses may override this method.

BaseGlyph._appendAnchor(name, position=None, color=None, identifier=None, **kwargs)[source]

name will be a valid anchor name. position will be a valid position (x, y). color will be None or a valid color. identifier will be a valid, nonconflicting identifier.

This must return the new anchor.

Subclasses may override this method.

BaseGlyph._appendComponent(baseGlyph, transformation=None, identifier=None, **kwargs)[source]

baseGlyph will be a valid glyph name. The baseGlyph may or may not be in the layer.

offset will be a valid offset (x, y). scale will be a valid scale (x, y). identifier will be a valid, nonconflicting identifier.

This must return the new component.

Subclasses may override this method.

BaseGlyph._appendContour(contour, offset=None, **kwargs)[source]

contour will be an object with a drawPoints method.

offset will be a valid offset (x, y).

This must return the new contour.

Subclasses may override this method.

BaseGlyph._appendGlyph(other, offset=None)[source]

Subclasses may override this method.

BaseGlyph._appendGuideline(position, angle, name=None, color=None, identifier=None, **kwargs)[source]

position will be a valid position (x, y). angle will be a valid angle. name will be a valid guideline name or None. color will be a valid color or None . identifier will be a valid, nonconflicting identifier.

This must return the new guideline.

Subclasses may override this method.

BaseGlyph._clear(contours=True, components=True, anchors=True, guidelines=True, image=True)[source]

Subclasses may override this method.

BaseGlyph._clearAnchors()[source]

Subclasses may override this method.

BaseGlyph._clearComponents()[source]

Subclasses may override this method.

BaseGlyph._clearContours()[source]

Subclasses may override this method.

BaseGlyph._clearGuidelines()[source]

Subclasses may override this method.

BaseGlyph._decompose()[source]

Subclasses may override this method.

BaseGlyph._getLayer(name, **kwargs)[source]

name will be a string, but there may not be a layer with a name matching the string. If not, a ValueError must be raised.

Subclasses may override this method.

BaseGlyph._get_anchors()[source]

Subclasses may override this method.

BaseGlyph._get_bottomMargin()[source]

This must return an int or float. If the glyph has no outlines, this must return None.

Subclasses may override this method.

BaseGlyph._get_bounds()[source]

Subclasses may override this method.

BaseGlyph._get_components()[source]

Subclasses may override this method.

BaseGlyph._get_contours()[source]

Subclasses may override this method.

BaseGlyph._get_guidelines()[source]

Subclasses may override this method.

BaseGlyph._get_leftMargin()[source]

This must return an int or float. If the glyph has no outlines, this must return None.

Subclasses may override this method.

BaseGlyph._get_rightMargin()[source]

This must return an int or float. If the glyph has no outlines, this must return None.

Subclasses may override this method.

BaseGlyph._get_topMargin()[source]

This must return an int or float. If the glyph has no outlines, this must return None.

Subclasses may override this method.

BaseGlyph._get_unicode()[source]

Get the primary unicode assigned to the glyph. This must return an integer or None.

Subclasses may override this method.

BaseGlyph._init(*args, **kwargs)

Subclasses may override this method.

BaseGlyph._interpolate(factor, minGlyph, maxGlyph, round=True, suppressError=True)[source]

Subclasses may override this method.

BaseGlyph._isCompatible(other, reporter)[source]

This is the environment implementation of BaseGlyph.isCompatible.

Subclasses may override this method.

BaseGlyph._iterContours(**kwargs)[source]

This must return an iterator that returns wrapped contours.

Subclasses may override this method.

BaseGlyph._moveBy(value, **kwargs)

This is the environment implementation of BaseObject.moveBy.

value will be an iterable containing two Integer/Float values defining the x and y values to move the object by. It will have been normalized with normalizers.normalizeTransformationOffset.

Subclasses may override this method.

BaseGlyph._pointInside(point)[source]

Subclasses may override this method.

BaseGlyph._removeLayer(name, **kwargs)[source]

name will be a valid layer name. It will represent an existing layer in the font.

Subclasses may override this method.

BaseGlyph._rotateBy(value, origin=None, **kwargs)

This is the environment implementation of BaseObject.rotateBy.

value will be a Integer/Float value defining the value to rotate the object by. It will have been normalized with normalizers.normalizeRotationAngle. origin will be a Coordinate defining the point at which the rotation should orginate.

Subclasses may override this method.

BaseGlyph._round()[source]

Subclasses may override this method.

BaseGlyph._scaleBy(value, origin=None, **kwargs)

This is the environment implementation of BaseObject.scaleBy.

value will be an iterable containing two Integer/Float values defining the x and y values to scale the object by. It will have been normalized with normalizers.normalizeTransformationScale. origin will be a Coordinate defining the point at which the scale should orginate.

Subclasses may override this method.

BaseGlyph._set_bottomMargin(value)[source]

value will be an int or float.

Subclasses may override this method.

BaseGlyph._set_leftMargin(value)[source]

value will be an int or float.

Subclasses may override this method.

BaseGlyph._set_rightMargin(value)[source]

value will be an int or float.

Subclasses may override this method.

BaseGlyph._set_topMargin(value)[source]

value will be an int or float.

Subclasses may override this method.

BaseGlyph._set_unicode(value)[source]

Assign the primary unicode to the glyph. This will be an integer or None.

Subclasses may override this method.

BaseGlyph._skewBy(value, origin=None, **kwargs)

This is the environment implementation of BaseObject.skewBy.

value will be an iterable containing two Integer/Float values defining the x and y values to skew the object by. It will have been normalized with normalizers.normalizeTransformationSkewAngle. origin will be a Coordinate defining the point at which the skew should orginate.

Subclasses may override this method.

BaseGlyph._transformBy(matrix, **kwargs)[source]

Subclasses may override this method.