logo
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.

Casts the value.

Casts the value.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.

OverflowingCasts the value.

Casts the value.

Casts the value.

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.

UnwrappedCasts the value.

Casts the value.

WrappingCasts the value.