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]
pub fn family(self, family: &str) -> Self
[src]
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]
Sets file for the Font to be loaded from. Mutually exclusive with family().
pub fn italic(self) -> Self
[src]
Flags the font to be italic.
pub fn oblique(self) -> Self
[src]
Flags the font to be oblique.
pub fn monospace(self) -> Self
[src]
Flags the font to be monospace.
pub fn bold(self) -> Self
[src]
Flags the font to be bold.
pub fn size(self, size: f32) -> Self
[src]
Sets the fontsize.
pub fn build(self) -> Result<Font>
[src]
Returns the constructed font instance.
Trait Implementations
impl<'a> Clone for FontBuilder<'a>
[src]
fn clone(&self) -> FontBuilder<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more