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
Auto Trait Implementations
impl<'a> !RefUnwindSafe for MonoFont<'a>
impl<'a> !UnwindSafe for MonoFont<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Performs the conversion.
Performs the conversion.
Casts the value.
type Output = T
type Output = T
Should always be Self
Casts the value.
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
Casts the value.
pub fn vzip(self) -> V
Casts the value.