Module embedded_graphics::mono_font[][src]

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 an ASCII and a Latin 1 (ISO 8859-1) variant. The ASCII variant contains a smaller subset of characters which saves memory in embedded application, but only covers all characters of the English language. The Latin 1 variant has complete coverage for the languages listed here, and partial coverage for these languages.

The table below shows the ASCII variant of the built-in fonts. See the latin1 module for an overview of the complete character set included in the Latin 1 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

ASCII variant of built-in fonts.

latin1

Latin 1 variant of built-in fonts.

Structs

DecorationDimensions

Decoration dimensions.

GlyphIndices

Glyph indices.

GlyphRange

Glyph range.

MonoFont

Monospaced bitmap font.

MonoFontBuilder

Mono font builder.

MonoTextStyle

Style properties for text using a monospaced font.

MonoTextStyleBuilder

Text style builder for monospaced fonts.