Struct radiant_rs::support::FontBuilder [−][src]
#[must_use]pub struct FontBuilder<'a> { /* fields omitted */ }
A font builder.
Obtained from Font::builder()
.
Examples
let my_font = Font::builder(&rendercontext).family("Arial").size(16.0).build().unwrap();
Methods
impl<'a> FontBuilder<'a>
[src]
impl<'a> FontBuilder<'a>
pub fn family(self, family: &str) -> Self
[src]
pub fn family(self, family: &str) -> Self
Sets a family for the font. The font will be retrieved from the operating system. Mutually exclusive with file().
pub fn file(self, file: &'a str) -> Self
[src]
pub fn file(self, file: &'a str) -> Self
Sets file for the Font to be loaded from. Mutually exclusive with family().
pub fn italic(self) -> Self
[src]
pub fn italic(self) -> Self
Flags the font to be italic.
pub fn oblique(self) -> Self
[src]
pub fn oblique(self) -> Self
Flags the font to be oblique.
pub fn monospace(self) -> Self
[src]
pub fn monospace(self) -> Self
Flags the font to be monospace.
pub fn bold(self) -> Self
[src]
pub fn bold(self) -> Self
Flags the font to be bold.
pub fn size(self, size: f32) -> Self
[src]
pub fn size(self, size: f32) -> Self
Sets the fontsize.
pub fn build(self) -> Result<Font>
[src]
pub fn build(self) -> Result<Font>
Returns the constructed font instance.
Trait Implementations
impl<'a> Clone for FontBuilder<'a>
[src]
impl<'a> Clone for FontBuilder<'a>
fn clone(&self) -> FontBuilder<'a>
[src]
fn clone(&self) -> FontBuilder<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> Send for FontBuilder<'a>
impl<'a> Send for FontBuilder<'a>
impl<'a> Sync for FontBuilder<'a>
impl<'a> Sync for FontBuilder<'a>