mcfonts.glyph.bitmap¶
A bitmap glyph contains an image.
Module Contents¶
- class BitmapGlyph(image: PIL.Image.Image)¶
Bases:
mcfonts.glyph.Glyph,mcfonts.serde.opentype.ToTrueTypeGlyph,mcfonts.serde.yaff.ToYaffData,mcfonts.serde.unihex.ToUnihexDataThe bitmap glyph contains an image. Image stored is always in RGBA mode.
-
__deepcopy__(memodict: collections.abc.Mapping[Any, Any] | None =
None) BitmapGlyph¶ Return a deep copy; image is implicitly copied.
- bake() PIL.Image.Image¶
Return a image rendering of this glyph.
This does not include any right padding.
- Return type:¶
PIL.Image.Image
- get_metrics() mcfonts.glyph.GlyphMetrics¶
Return the metrics of this glyph.
- show() str¶
Return a pretty visual representation of this glyph.
It is best to pass this into
print().
- to_truetype_glyph() fontTools.ttLib.tables._g_l_y_f.Glyph¶
Process and convert this glyph into rectangle shapes.
- to_unihex_data() str¶
Process and convert this glyph into GNU Unihex data.
-
maximum_dimension : ClassVar[int] =
256¶
-
pixel_alpha_threshold : ClassVar[int] =
180¶
-
__deepcopy__(memodict: collections.abc.Mapping[Any, Any] | None =