logo
Expand description

Monospaced bitmap fonts.

This module contains support for drawing monospaced bitmap fonts and provides several built-in fonts.

Additional custom fonts can be added by the application or other crates. This is demonstrated in the text-custom-font example in the examples repository.

Examples

The text module contains examples how these fonts can be used in an application.

Built-in fonts

Each built-in font is provided in different glyph subsets. The ASCII variant is the smallest subset which saves memory in embedded applications, but only covers all characters of the English language. The ISO 8859 subsets support a wide range of languages, see Wikipedia for a list of languages.

The table below shows the ASCII variant of the built-in fonts. See the subset modules for an overview of the complete character set included in the other variants.

TypeScreenshotTypeScreenshot
FONT_4X6FONT_4X6FONT_7X13_ITALICFONT_7X13_ITALIC
FONT_5X7FONT_5X7FONT_7X14FONT_7X14
FONT_5X8FONT_5X8FONT_7X14_BOLDFONT_7X14_BOLD
FONT_6X9FONT_6X9FONT_8X13FONT_8X13
FONT_6X10FONT_6X10FONT_8X13_BOLDFONT_8X13_BOLD
FONT_6X12FONT_6X12FONT_8X13_ITALICFONT_8X13_ITALIC
FONT_6X13FONT_6X13FONT_9X15FONT_9X15
FONT_6X13_BOLDFONT_6X13_BOLDFONT_9X15_BOLDFONT_9X15_BOLD
FONT_6X13_ITALICFONT_6X13_ITALICFONT_9X18FONT_9X18
FONT_7X13FONT_7X13FONT_9X18_BOLDFONT_9X18_BOLD
FONT_7X13_BOLDFONT_7X13_BOLDFONT_10X20FONT_10X20

Modules

ASCII glyph subset.

ISO_8859_1 glyph subset.

ISO_8859_2 glyph subset.

ISO_8859_3 glyph subset.

ISO_8859_4 glyph subset.

ISO_8859_5 glyph subset.

ISO_8859_7 glyph subset.

ISO_8859_9 glyph subset.

ISO_8859_10 glyph subset.

ISO_8859_13 glyph subset.

ISO_8859_14 glyph subset.

ISO_8859_15 glyph subset.

ISO_8859_16 glyph subset.

JIS_X0201 glyph subset.

Glyph mapping.

Structs

Decoration dimensions.

Monospaced bitmap font.

Style properties for text using a monospaced font.

Text style builder for monospaced fonts.