pub struct FontConfig {Show 13 fields
pub size_pixels: f32,
pub oversample_h: i32,
pub oversample_v: i32,
pub pixel_snap_h: bool,
pub glyph_extra_spacing: [f32; 2],
pub glyph_offset: [f32; 2],
pub glyph_ranges: FontGlyphRanges,
pub glyph_min_advance_x: f32,
pub glyph_max_advance_x: f32,
pub rasterizer_flags: u32,
pub rasterizer_multiply: f32,
pub ellipsis_char: Option<char>,
pub name: Option<String>,
}Expand description
Configuration settings for a font
Fields§
§size_pixels: f32Size in pixels for the rasterizer
oversample_h: i32Horizontal oversampling
oversample_v: i32Vertical oversampling
pixel_snap_h: boolAlign every glyph to pixel boundary
glyph_extra_spacing: [f32; 2]Extra spacing (in pixels) between glyphs
glyph_offset: [f32; 2]Offset for all glyphs in this font
glyph_ranges: FontGlyphRangesUnicode ranges to use from this font
glyph_min_advance_x: f32Minimum advance_x for glyphs
glyph_max_advance_x: f32Maximum advance_x for glyphs
rasterizer_flags: u32Settings for a custom font rasterizer if used
rasterizer_multiply: f32Brighten (>1.0) or darken (<1.0) font output
ellipsis_char: Option<char>Explicitly specify the ellipsis character.
With multiple font sources the first specified ellipsis is used.
name: Option<String>Trait Implementations§
Source§impl Clone for FontConfig
impl Clone for FontConfig
Source§fn clone(&self) -> FontConfig
fn clone(&self) -> FontConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FontConfig
impl Debug for FontConfig
Source§impl Default for FontConfig
impl Default for FontConfig
Source§fn default() -> FontConfig
fn default() -> FontConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FontConfig
impl RefUnwindSafe for FontConfig
impl !Send for FontConfig
impl !Sync for FontConfig
impl Unpin for FontConfig
impl UnwindSafe for FontConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more