mcfonts.glyph.space

Module Contents

class SpaceGlyph(width: int)

Bases: mcfonts.glyph.Glyph, mcfonts.serde.yaff.ToYaffData

The space glyph contains its width.

Parameters:
width : int

__deepcopy__(memodict: collections.abc.Mapping[Any, Any] | None = None) SpaceGlyph

Return a deep copy; width is implicitly copied.

Parameters:
memodict : collections.abc.Mapping[Any, Any] | None

Return type:

SpaceGlyph

__repr__() str

Return SpaceGlyph(width x).

Return type:

str

bake(scale: int = 1) PIL.Image.Image

Return a image rendering of this glyph.

This does not include any right padding.

Parameters:
scale : int

Return type:

PIL.Image.Image

get_metrics() mcfonts.glyph.GlyphMetrics

Return the metrics of this glyph.

Returns:

The metrics.

Return type:

mcfonts.glyph.GlyphMetrics

get_width() int
Return type:

int

show() str

Return a pretty visual representation of this glyph.

It is best to pass this into print().

Returns:

String of glyph representation.

Return type:

str

to_yaff_data() list[str]
Return type:

list[str]

height : ClassVar[int] = 1
maximum_width : ClassVar[int] = 256