Struct native_windows_gui::FontBuilder
source · [−]pub struct FontBuilder<'a> { /* private fields */ }
Expand description
Builds a font struct
Parameters: - size: Size of the font. The font mapper transforms this value into device units and matches it against the cell height of the available fonts. - size_absolute: Size of the font. The font mapper transforms this value into device units and matches its absolute value against the character height of the available fonts. - weight: Weight of the font. A value betweem 0 and 1000. 0 use the system default, 100 is very thin, 1000 is very bold. - family: Family name of the font (ex: Arial). Can be None to use the system default.
Implementations
sourceimpl<'a> FontBuilder<'a>
impl<'a> FontBuilder<'a>
pub fn new() -> FontBuilder<'a>
pub fn size(self, size: u32) -> FontBuilder<'a>
pub fn size_absolute(self, size: u32) -> FontBuilder<'a>
pub fn weight(self, weight: u32) -> FontBuilder<'a>
pub fn family(self, fam: &'a str) -> FontBuilder<'a>
pub fn build(self, font: &mut Font) -> Result<(), NwgError>
Auto Trait Implementations
impl<'a> RefUnwindSafe for FontBuilder<'a>
impl<'a> Send for FontBuilder<'a>
impl<'a> Sync for FontBuilder<'a>
impl<'a> Unpin for FontBuilder<'a>
impl<'a> UnwindSafe for FontBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more