Struct embedded_graphics::mono_font::MonoFont[][src]

pub struct MonoFont<'a> {
    pub image: ImageRaw<'a, BinaryColor>,
    pub character_size: Size,
    pub character_spacing: u32,
    pub baseline: u32,
    pub strikethrough: DecorationDimensions,
    pub underline: DecorationDimensions,
    pub glyph_mapping: &'a dyn GlyphMapping,
}
Expand description

Monospaced bitmap font.

See the module documentation for more information about using fonts.

Fields

image: ImageRaw<'a, BinaryColor>

Raw image data containing the font.

character_size: Size

Size of a single character in pixel.

character_spacing: u32

Spacing between characters.

The spacing defines how many empty pixels are added horizontally between adjacent characters on a single line of text.

baseline: u32

The baseline.

Offset from the top of the glyph bounding box to the baseline.

strikethrough: DecorationDimensions

Strikethrough decoration dimensions.

underline: DecorationDimensions

Underline decoration dimensions.

glyph_mapping: &'a dyn GlyphMapping

Glyph mapping.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Casts the value.

Should always be Self

Casts the value.

Performance hack: Clone doesn’t get inlined for Copy types in debug mode, so make it inline anyway.

Tests if Self the same as the type T Read more

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.