Struct speedy2d::font::Font [−][src]
#[repr(transparent)]pub struct Font { /* fields omitted */ }
Expand description
A struct representing a font.
Implementations
Constructs a new font from the specified bytes.
The font may be in TrueType or OpenType format. Support for OpenType fonts may be limited.
Trait Implementations
Returns the glyph corresponding to the provided codepoint. If the glyph
cannot be found, None
is returned. Read more
fn layout_text(
&self,
text: &str,
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
fn layout_text(
&self,
text: &str,
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
Lays out a block of text with the specified scale and options. The
result may be passed to Graphics2D::draw_text
. Read more
fn layout_text_from_unindexed_codepoints(
&self,
unindexed_codepoints: &[char],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
fn layout_text_from_unindexed_codepoints(
&self,
unindexed_codepoints: &[char],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
Lays out a block of text with the specified scale and options. The
result may be passed to Graphics2D::draw_text
. Read more
fn layout_text_from_codepoints(
&self,
codepoints: &[Codepoint],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
fn layout_text_from_codepoints(
&self,
codepoints: &[Codepoint],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
Lays out a block of text with the specified scale and options. The
result may be passed to Graphics2D::draw_text
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Font
impl UnwindSafe for Font
Blanket Implementations
Mutably borrows from an owned value. Read more