mcfonts.convert.glyphs

Facilitates converting between glyphs.

Module Contents

class GlyphConverterStorage

Bases: mcfonts.convert.ConverterStorage[mcfonts.glyph.Glyph]

Type-safe container for glyph converters.

__delitem__[G1: mcfonts.glyph.Glyph, G2: mcfonts.glyph.Glyph](key: tuple[type[G1], type[G2]], /) None
Parameters:
key : tuple[type[G1], type[G2]]

Return type:

None

__getitem__[G1: mcfonts.glyph.Glyph, G2: mcfonts.glyph.Glyph](key: tuple[type[G1], type[G2]], /) collections.abc.Callable[[G1], G2]
Parameters:
key : tuple[type[G1], type[G2]]

Return type:

collections.abc.Callable[[G1], G2]

__iter__() collections.abc.Iterator[tuple[type[mcfonts.glyph.Glyph], type[mcfonts.glyph.Glyph]]]
Return type:

collections.abc.Iterator[tuple[type[mcfonts.glyph.Glyph], type[mcfonts.glyph.Glyph]]]

__len__() int
Return type:

int

__setitem__[G1: mcfonts.glyph.Glyph, G2: mcfonts.glyph.Glyph](key: tuple[type[G1], type[G2]], value: collections.abc.Callable[[G1], G2], /)
Parameters:
key : tuple[type[G1], type[G2]]

value : collections.abc.Callable[[G1], G2]

Return type:

None

glyph_bitmap_to_space(source: mcfonts.glyph.bitmap.BitmapGlyph) mcfonts.glyph.space.SpaceGlyph
Parameters:
source : mcfonts.glyph.bitmap.BitmapGlyph

Return type:

mcfonts.glyph.space.SpaceGlyph

glyph_bitmap_to_unihex(source: mcfonts.glyph.bitmap.BitmapGlyph) mcfonts.glyph.unihex.UnihexGlyph
Parameters:
source : mcfonts.glyph.bitmap.BitmapGlyph

Return type:

mcfonts.glyph.unihex.UnihexGlyph

glyph_space_to_bitmap(source: mcfonts.glyph.space.SpaceGlyph) mcfonts.glyph.bitmap.BitmapGlyph
Parameters:
source : mcfonts.glyph.space.SpaceGlyph

Return type:

mcfonts.glyph.bitmap.BitmapGlyph

glyph_space_to_unihex(source: mcfonts.glyph.space.SpaceGlyph) mcfonts.glyph.unihex.UnihexGlyph
Parameters:
source : mcfonts.glyph.space.SpaceGlyph

Return type:

mcfonts.glyph.unihex.UnihexGlyph

glyph_unihex_to_bitmap(source: mcfonts.glyph.unihex.UnihexGlyph) mcfonts.glyph.bitmap.BitmapGlyph
Parameters:
source : mcfonts.glyph.unihex.UnihexGlyph

Return type:

mcfonts.glyph.bitmap.BitmapGlyph

glyph_unihex_to_space(source: mcfonts.glyph.unihex.UnihexGlyph) mcfonts.glyph.space.SpaceGlyph
Parameters:
source : mcfonts.glyph.unihex.UnihexGlyph

Return type:

mcfonts.glyph.space.SpaceGlyph

GLYPH_CONVERTERS : Final[GlyphConverterStorage]