Glyph¶
Must Override¶
- BaseGlyph._addImage(data: bytes, transformation: AffineTransformationLike | None, color: RGBALike | None) BaseImage[source]¶
Set the image in the native glyph.
Each environment may have different possible formats, so this is unspecified. Assigning the image to the glyph will be handled by the base class.
- Parameters:
data – The raw image data to add to the glyph as
bytes.transformation – The Transformation Matrix values to be applied to the image or
None.color – The color to be applied to the image as a Color or
None.
- Returns:
The
BaseImagesubclass instance added to the glyph.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._autoUnicodes() None[source]¶
Use heuristics to set the Unicode values in the native glyph.
This is the environment implementation of
BaseGlyph.autoUnicodes.- Returns:
Description of
None.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._clearImage(**kwargs: Any) None[source]¶
Remove the image from the native glyph.
- Parameters:
**kwargs – Additional keyword arguments.
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
- BaseGlyph._getAnchor(index: int, **kwargs: Any) BaseAnchor[source]¶
Get the anchor at the given index from the native glyph.
- Parameters:
index – The index of the anchor to get as an
int.**kwargs – Additional keyword arguments.
- Returns:
An instance of a
BaseAnchorsubclass.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._getComponent(index: int, **kwargs: Any) BaseComponent[source]¶
Get the component at the given index from the native glyph.
- Parameters:
index – The index of the component to return as an
int.**kwargs – Additional keyword arguments.
- Returns:
An instance of a
BaseComponentsubclass.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._getContour(index: int, **kwargs: Any) BaseContour[source]¶
Get the contour located at the given index from the native glyph.
- Parameters:
index – The index of the contour to return as an
int.**kwargs – Additional keyword arguments.
- Returns:
An instance of a
BaseContoursubclass.
Subclasses must override this method.
- BaseGlyph._getGuideline(index: int, **kwargs: Any) BaseGuideline[source]¶
Get the guideline at the given index from the native glyph.
- Parameters:
index – The index of the guideline to get as an
int.**kwargs – Additional keyword arguments.
- Returns:
An instance of a
BaseGuidelinesubclass.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._get_height() int | float[source]¶
Get the native glyph’s height.
This is the environment implementation of the
BaseGlyph.heightproperty getter.- Returns:
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._get_image() BaseImage | None[source]¶
Get the image for the native glyph.
- Returns:
The
BaseImagesubclass instance belonging to the glyph, orNoneif the glyph has no image.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._get_lib() BaseLib[source]¶
Get the native glyph’s lib object.
This is the environment implementation of
BaseFont.lib.- Returns:
An instance of a
BaseLibsubclass.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._get_markColor() tuple[float, float, float, float] | None[source]¶
Get the glyph’s mark color.
This is the environment implementation of the
BaseGlyph.markColorproperty getter.- Returns:
The Color value assigned to the glyph, or:obj:None if no color has been assigned.
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._get_name() str[source]¶
Get the name of the native glyph.
This is the environment implementation of the
BaseGlyph.nameproperty getter.- :return A
strdefining the name of the glyph. The value will be normalized with
normalizers.normalizeLayerName.
Important
Subclasses must override this method.
- :return A
- BaseGlyph._get_note() str | None[source]¶
Get the glyph’s note.
This is the environment implementation of the
BaseGlyph.noteproperty getter.- Returns:
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._get_unicodes() list[int] | tuple[int, ...][source]¶
Get the Unicode values assigned to the glyph.
This is the environment implementation of the
BaseGlyph.unicodesproperty getter.- Returns:
A
tupleofintvalues representing the glyphs Unicode values in order from most to least important. The value will be normalized withnormalizers.normalizeGlyphUnicodes(value).- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._get_width() int | float[source]¶
Get the width of the native glyph.
This is the environment implementation of the
BaseGlyph.widthproperty getter.- Returns:
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._lenAnchors(**kwargs: Any) int[source]¶
Get the number of anchors in the ntive glyph.
- Parameters:
**kwargs – Additional keyword arguments.
- Returns:
An
intindicating the number of anchors in the glyph.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._lenComponents(**kwargs: Any) int[source]¶
Get the number of components in the glyph.
- Parameters:
**kwargs – Additional keyword arguments.
- Returns:
An
intindicating the number of components in the glyph.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._lenContours(**kwargs: Any) int[source]¶
Get the number of contours in the native glyph.
This is the environment implementation of
BaseGlyph.__len__.- Parameters:
**kwargs – Additional keyword arguments.
- Returns:
An
intrepresenting the number of contours in the glyph.
Important
Subclasses must override this method.
- BaseGlyph._lenGuidelines(**kwargs: Any) int[source]¶
Get the number of guidelines in the ntive glyph.
- Parameters:
**kwargs – Additional keyword arguments.
- Returns:
An
intindicating the number of guidelines in the glyph.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._newLayer(name: str, **kwargs) BaseGlyph[source]¶
Create a new layer in the glyph.
This is the environment implementation of
BaseGlyph.newLayer.- Parameters:
name – The name of the new layer to create. The value must be unique to the font and will have been normalized with
normalizers.normalizeLayerName.**kwargs – Additional keyword arguments.
- Returns:
A newly created
BaseLayersubclass instance.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._removeAnchor(index: int, **kwargs: Any) None[source]¶
Remove the given anchor from the glyph.
This is the environment implementation of
BaseGlyph.removeAnchor.- Parameters:
index – The index of the anchor to remove as an
int.**kwargs – Additional keyword arguments.
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._removeComponent(index: int, **kwargs: Any) None[source]¶
Remove the specified component from the native glyph.
This is the environment implementation of
BaseGlyph.removeComponent.- Parameters:
index – The index of the component to remove as an
int.**kwargs – Additional keyword arguments.
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._removeContour(index: int, **kwargs: Any) None[source]¶
Remove the given contour from the native glyph.
This is the environment implementation of
BaseGlyph.removeContour.- Parameters:
contour – The contour to remove as a
BaseContourinstance or anintrepresenting a contour index.**kwargs – Additional keyword arguments.
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._removeGuideline(index: int, **kwargs: Any) None[source]¶
Remove the given guideline from the glyph.
This is the environment implementation of
BaseGlyph.removeGuideline.- Parameters:
index – The index of the guideline to remove as an
int.**kwargs – Additional keyword arguments.
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._removeOverlap() None[source]¶
Perform a remove overlap operation on the native glyph’s contours.
This is the environment implementation of
BaseGlyph.removeOverlap.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must implement this method.
- BaseGlyph._set_height(value: int | float) None[source]¶
Set the native glyph’s height.
This is the environment implementation of the
BaseGlyph.heightproperty setter.- Parameters:
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._set_markColor(value: list[int | float] | tuple[float, float, float, float] | None) None[source]¶
Set the glyph’s mark color.
This is the environment implementation of the
BaseGlyph.markColorproperty setter.- Parameters:
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._set_name(value: str) None[source]¶
Set the name of the native glyph.
This is the environment implementation of the
BaseGlyph.nameproperty setter.- Parameters:
value – The name to assign to the glyph as a
str. The value will have been normalized withnormalizers.normalizeGlyphNameand must be unique to the layer.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._set_note(value: str | None) None[source]¶
Set the glyph’s note.
This is the environment implementation of the
BaseGlyph.noteproperty setter.- Parameters:
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._set_unicodes(value: list[int] | tuple[int, ...]) None[source]¶
Assign Unicode values to the glyph.
This is the environment implementation of the
BaseGlyph.unicodesproperty setter.- Parameters:
value – A
listortupleofintvalues in order from most to least important. The value will have been normalized withnormalizers.normalizeGlyphUnicodes(value).- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseGlyph._set_width(value: int | float) None[source]¶
Set the width of the native glyph.
This is the environment implementation of the
BaseGlyph.widthproperty setter.- Parameters:
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
May Override¶
- BaseGlyph.__add__(other: BaseGlyph) BaseGlyph[source]¶
Add another glyph to the current glyph.
- Parameters:
other – The
BaseGlyphinstance to add to the current glyph.- Returns:
A new
BaseGlyphinstance representing the added results.
Note
Subclasses may override this method.
- BaseGlyph.__div__(factor: int | float | list[int | float] | tuple[float, float]) BaseGlyph¶
Divide the current glyph by a given factor.
- Parameters:
factor – The factor by which to divide the glyph as a single
intorfloator atupleof twointorfloatvalues representing the factors(x, y).- Returns:
The newly divided
BaseGlyphinstance.
Note
Subclasses may override this method.
- BaseGlyph.__mul__(factor: int | float | list[int | float] | tuple[float, float]) BaseGlyph[source]¶
Multiply the current glyph by a given factor.
- Parameters:
factor – The factor by which to multiply the glyph as a single
intorfloator atupleof twointorfloatvalues representing the factors(x, y).- Returns:
The newly multiplied
BaseGlyphinstance.
Note
Subclasses may override this method.
- BaseGlyph.__rmul__(factor: int | float | list[int | float] | tuple[float, float]) BaseGlyph¶
Multiply the current glyph by a given factor.
- Parameters:
factor – The factor by which to multiply the glyph as a single
intorfloator atupleof twointorfloatvalues representing the factors(x, y).- Returns:
The newly multiplied
BaseGlyphinstance.
Note
Subclasses may override this method.
- BaseGlyph.__sub__(other: BaseGlyph) BaseGlyph[source]¶
Subtract another glyph from the current glyph.
- Parameters:
other – The
BaseGlyphinstance to subtract from the current glyph.- Returns:
A new
BaseGlyphinstance representing the subtracted results.
Note
Subclasses may override this method.
- BaseGlyph._appendAnchor(name: str, position: CoordinateLike | None, color: RGBALike | None, identifier: str | None, **kwargs: Any) BaseAnchor[source]¶
Append an anchor to the native glyph.
This is the environment implementation of
BaseGlyph.appendAnchor.- Parameters:
name – The name to be assigned to the anchor as a
strorNone.position – The x and y location to be applied to the anchor as a Coordinate or
None.color – The color to be applied to the anchor as a Color or
None.identifier – A valid, nonconflicting Identifier as a :clss:`str` or
None.**kwargs – Additional keyword arguments.
- Returns:
The newly appended
BaseAnchorsubclass instance.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Note
Subclasses may override this method.
- BaseGlyph._appendComponent(baseGlyph: str, transformation: AffineTransformationLike | None, identifier: str | None, **kwargs: Any) BaseComponent[source]¶
Append a component to the native glyph.
This is the environment implementation of
BaseGlyph.appendComponent.- Parameters:
baseGlyph – The glyph name to append as a component.
transformation – The Transformation Matrix values to be applied to the appended data or
None.identifier – A valid, nonconflicting Identifier as a :clss:`str` or
None.**kwargs – Additional keyword arguments.
- Returns:
The newly appended
BaseComponentsubclass instance.
Note
Subclasses may override this method.
- BaseGlyph._appendContour(contour: BaseContour, offset: CoordinateLike, **kwargs: Any) BaseContour[source]¶
Append the given contour’s data to the native glyph.
This is the environment implementation of
BaseGlyph.appendContour.- Parameters:
contour – The
BaseContourinstace containing the source data to append.offset – The x and y shift values to be applied to the appended data as a Coordinate.
**kwargs – Additional keyword arguments.
- Returns:
A
BaseContourinstance containing the appended data.
Note
Subclasses may override this method.
- BaseGlyph._appendGlyph(other: BaseGlyph, offset: list[int | float] | tuple[int | float, int | float]) None[source]¶
Append data from other to new objects in the native glyph.
This is the environment implementation of
BaseGlyph.appendGlyph.- Parameters:
other – The
BaseGlyphinstace containing the source data to append.offset – The x and y shift values to be applied to the appended data as a Coordinate.
Note
Subclasses may override this method.
- BaseGlyph._appendGuideline(position: CoordinateLike, angle: IntFloatType, name: str | None, color: RGBALike | None, identifier: str | None, **kwargs: Any) BaseGuideline[source]¶
Append a guideline to the native glyph.
This is the environment implementation of
BaseGlyph.appendGuideline.- Parameters:
position – The x and y location to be applied to the guideline as a Coordinate.
angle – The angle to be applied to the guideline as
intorfloat.name – The name to be assigned to the guideline as a
strorNone.color – The color to be applied to the guideline as a Color or
None.identifier – An optioanal valid, nonconflicting Identifier as a :clss:`str` or
None.**kwargs – Additional keyword arguments.
- Returns:
The newly appended
BaseGuidelinesubclass instance.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Note
Subclasses may override this method.
- BaseGlyph._clear(contours: bool, components: bool, anchors: bool, guidelines: bool, image: bool) None[source]¶
Clear the native glyph data.
This is the environment implementation of
BaseGlyph.clear.- Parameters:
contours – Whether to clear the glyph’s contour data.
components – Whether to clear the glyph’s component data.
anchors – Whether to clear the glyph’s anchor data.
guidelines – Whether to clear the glyph’s guideline data.
image – Whether to clear the glyph’s image data.
Note
Subclasses may override this method.
- BaseGlyph._clearAnchors() None[source]¶
Clear all anchors in the native glyph.
This is the environment implementation of
BaseGlyph.clearAnchors.Note
Subclasses may override this method.
- BaseGlyph._clearComponents() None[source]¶
Clear all components in the native glyph.
This is the environment implementation of
BaseGlyph.clearComponents.Note
Subclasses may override this method.
- BaseGlyph._clearContours() None[source]¶
Clear all contours in the native glyph.
This is the environment implementation of
BaseGlyph.clearContours.Note
Subclasses may override this method.
- BaseGlyph._clearGuidelines() None[source]¶
Clear all guidelines in the native glyph.
This is the environment implementation of
BaseGlyph.clearGuidelines.Note
Subclasses may override this method.
- BaseGlyph._decompose() None[source]¶
Decompose all components in the native glyph to contours.
Note
Subclasses may override this method.
- BaseGlyph._getLayer(name: str, **kwargs) BaseGlyph[source]¶
Get the named layer from the native glyph.
- Parameters:
name – The name of the
BaseLayerinstance to retrieve.**kwargs – Additional keyword arguments.
- Returns:
The specified
BaseLayerinstance.- Raises:
ValueError – If no layer with the given name exists in the font.
Note
Subclasses may override this method.
- BaseGlyph._get_anchors() tuple[BaseAnchor, ...][source]¶
Get all anchors in the native glyph.
- Returns:
A
tupleofBaseAnchorsubclass instances.
Note
Subclasses may override this method.
- BaseGlyph._get_bottomMargin() int | float | None[source]¶
Get the native glyph’s bottom margin.
This is the environment implementation of the
BaseGlyph.bottomMarginproperty getter.- Returns:
The bottom glyph margin as an
intor afloat, orNoneto indicate that the glyph has no outlines.
Note
Subclasses may override this method.
- BaseGlyph._get_bounds() tuple[float, float, float, float] | None[source]¶
Get the bounds of the native glyph.
This is the environment implementation of the
BaseGlyph.boundsproperty getter.- Returns:
A
tupleof fourintorfloatvalues in the form(x minimum, y minimum, x maximum, y maximum)representing the bounds of the glyph, orNoneif the glyph is empty.
Note
Subclasses may override this method.
- BaseGlyph._get_components() tuple[BaseComponent, ...][source]¶
Get all components in the native glyph.
This is the environment implementation of the
BaseGlyph.componentsproperty getter.- Returns:
A
tupleofBaseComponentsubclass instances.
Note
Subclasses may override this method.
- BaseGlyph._get_contours() tuple[BaseContour, ...][source]¶
Get all contours in the native glyph.
This is the environment implementation of the
BaseGlyph.contoursproperty getter.- Returns:
A
tupleofBaseContoursubclass instances.
Note
Subclasses may override this method.
- BaseGlyph._get_guidelines() tuple[BaseGuideline, ...][source]¶
Get all guidelines in the glyph.
This is the environment implementation of the
BaseGlyph.guidelinesproperty getter.- Returns:
A
tupleofBaseGuidelinesubclass instances.
Note
Subclasses may override this method.
- BaseGlyph._get_leftMargin() int | float | None[source]¶
Get the native glyph’s left margin.
This is the environment implementation of the
BaseGlyph.leftMarginproperty getter.Note
Subclasses may override this method.
- BaseGlyph._get_rightMargin() int | float | None[source]¶
Get the native glyph’s right margin.
This is the environment implementation of the
BaseGlyph.rightMarginproperty getter.Note
Subclasses may override this method.
- BaseGlyph._get_topMargin() int | float | None[source]¶
Get the native glyph’s top margin.
This is the environment implementation of the
BaseGlyph.topMarginproperty getter.- Returns:
The top glyph margin as an
intor afloat, orNoneto indicate that the glyph has no outlines.
Note
Subclasses may override this method.
- BaseGlyph._get_unicode() int | None[source]¶
Get the primary Unicode value assigned to the native glyph.
This is the environment implementation of the
BaseGlyph.unicodeproperty getter.Note
Subclasses may override this method.
- BaseGlyph._init(*args: Any, **kwargs: Any) None¶
Initialize the native object.
This is the environment implementation of
BaseObject.__init__.- Parameters:
*args – Any positional arguments.
**kwargs – Any keyword arguments.
Note
Subclasses may override this method.
- BaseGlyph._interpolate(factor: list[int | float] | tuple[float, float], minGlyph: BaseGlyph, maxGlyph: BaseGlyph, round: bool, suppressError: bool) None[source]¶
Interpolate all possible data in the native glyph.
This is the environment implementation of
BaseGlyph.interpolate.- Parameters:
factor – The interpolation value as a single
intorfloator atupleof twointorfloatvalues representing the factors(x, y).minLayer – The
BaseLayersubclass instance corresponding to the 0.0 position in the interpolation.maxLayer – The
BaseLayersubclass instance corresponding to the 1.0 position in the interpolation.round – A
boolindicating whether the result should be rounded to integers.suppressError – A
boolindicating whether to ignore incompatible data or raise an error when such incompatibilities are found.
- Raises:
FontPartsError – If
suppressError=Falseand the interpolation data is incompatible.
Note
Subclasses may override this method.
- BaseGlyph._isCompatible(other: BaseGlyph, reporter: GlyphCompatibilityReporter) None[source]¶
Evaluate interpolation compatibility with another native glyph.
This is the environment implementation of
BaseGlyph.isCompatible.- Parameters:
other – The other
BaseGlyphinstance to check compatibility with.reporter – An object used to report compatibility issues.
Note
Subclasses may override this method.
- BaseGlyph._iterContours(**kwargs: Any) Iterator[BaseContour][source]¶
Iterate through all contours in the native glyph.
This is the environment implementation of
BaseGlyph.__iter__.- Parameters:
**kwargs – Additional keyword arguments.
- Returns:
An iterator of
BaseContoursubclass instances.
Note
Subclasses may override this method.
- BaseGlyph._moveBy(value: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Move the native object according to the given coordinates.
This is the environment implementation of
BaseObject.moveBy.- Parameters:
value – The x and y values to move the object by as a Coordinate. The value will have been normalized with
normalizers.normalizeTransformationOffset.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseGlyph._pointInside(point: list[int | float] | tuple[int | float, int | float]) bool[source]¶
Check if point lies inside the filled area of the native glyph.
This is the environment implementation of
BaseGlyph.pointInside.- Parameters:
point – The point to check as a Coordinate.
- Returns:
Trueif point is inside the filled area of the glyph,Falseotherwise.
Note
Subclasses may override this method.
- BaseGlyph._removeLayer(name: str, **kwargs: Any) None[source]¶
Remove the specified layer from the native glyph.
This is the environment implementation of
BaseGlyph.removeLayer.- Parameters:
name – The name of the layer to remove. The value will have been normalized with
normalizers.normalizeLayerName.**kwargs – Additional keyword arguments.
- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Note
Subclasses may override this method.
- BaseGlyph._rotateBy(value: float, origin: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Rotate the native object by the specified value.
This is the environment implementation of
TransformationMixin.rotateBy.- Parameters:
value – The angle at which to rotate the object as an
intor afloat. The value will have been normalized withnormalizers.normalizeRotationAngle.origin – The point at which the rotation should originate as a Coordinate or
None. The value will have been normalized withnormalizers.normalizeCoordinateTuple.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseGlyph._round() None[source]¶
Round coordinates in the native glyph to the nearest integer.
This is the environment implementation of
BaseGlyph.round.Note
Subclasses may override this method.
- BaseGlyph._scaleBy(value: list[int | float] | tuple[float, float], origin: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Scale the native object according to the given values.
This is the environment implementation of
BaseObject.scaleBy.- Parameters:
value – The value to scale the glyph by as a single
intorfloat, or atupleorlistof twointorfloatvalues representing the values(x, y). The value will have been normalized withnormalizeTransformationScale.origin – The point at which the scale should originate as a Coordinate or
None. The value will have been normalized withnormalizers.normalizeCoordinateTuple.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseGlyph._set_bottomMargin(value: int | float) None[source]¶
Set the native glyph’s bottom margin.
This is the environment implementation of the
BaseGlyph.bottomMarginproperty setter.Note
Subclasses may override this method.
- BaseGlyph._set_leftMargin(value: int | float) None[source]¶
Set the native glyph’s left margin.
This is the environment implementation of the
BaseGlyph.leftMarginproperty setter.Note
Subclasses may override this method.
- BaseGlyph._set_rightMargin(value: int | float) None[source]¶
Set the native glyph’s right margin.
This is the environment implementation of the
BaseGlyph.rightMarginproperty setter.Note
Subclasses may override this method.
- BaseGlyph._set_topMargin(value: int | float) None[source]¶
Set the native glyph’s top margin.
This is the environment implementation of the
BaseGlyph.topMarginproperty setter.Note
Subclasses may override this method.
- BaseGlyph._set_unicode(value: int | None) None[source]¶
Assign the primary Unicode value to the native glyph.
This is the environment implementation of the
BaseGlyph.unicodeproperty setter.Note
Subclasses may override this method.
- BaseGlyph._skewBy(value: list[int | float] | tuple[float, float], origin: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Skew the native object by the given value.
This is the environment implementation of
TransformationMixin.skewBy.- Parameters:
value – The value by which to skew the object as either a single
intorfloatcorresponding to the x direction, or atupleof twointorfloatvalues corresponding to the x and y directions. The value will have been normalized withnormalizers.normalizeTransformationSkewAngle.origin – The point at which the rotation should originate as a Coordinate or
None. The value will have been normalized withnormalizers.normalizeCoordinateTuple.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseGlyph._transformBy(matrix: list[int | float] | tuple[float, float, float, float, float, float], **kwargs: Any) None[source]¶
Transform the glyph according to the given matrix.
- Parameters:
matrix – The Transformation Matrix to apply.
**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.