Struct speedy2d::font::FontFamily
source · pub struct FontFamily { /* private fields */ }
Expand description
A collection of fonts, in decreasing order of priority. When laying out text, if a codepoint cannot be found in the first font in the list, the subsequent fonts will also be searched.
Implementations§
Trait Implementations§
source§impl Clone for FontFamily
impl Clone for FontFamily
source§fn clone(&self) -> FontFamily
fn clone(&self) -> FontFamily
Returns a copy 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 FontFamily
impl Debug for FontFamily
source§impl Hash for FontFamily
impl Hash for FontFamily
source§impl PartialEq<FontFamily> for FontFamily
impl PartialEq<FontFamily> for FontFamily
source§fn eq(&self, other: &FontFamily) -> bool
fn eq(&self, other: &FontFamily) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TextLayout for FontFamily
impl TextLayout for FontFamily
source§fn lookup_glyph_for_codepoint(&self, codepoint: char) -> Option<FontGlyph>
fn lookup_glyph_for_codepoint(&self, codepoint: char) -> Option<FontGlyph>
Returns the glyph corresponding to the provided codepoint. If the glyph
cannot be found,
None
is returned.source§fn empty_line_vertical_metrics(&self, scale: f32) -> LineVerticalMetrics
fn empty_line_vertical_metrics(&self, scale: f32) -> LineVerticalMetrics
The default metrics of a line which contains no characters.
source§fn layout_text(
&self,
text: &str,
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock>
fn layout_text(
&self,
text: &str,
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock>
Lays out a block of text with the specified scale and options. The
result may be passed to
Graphics2D::draw_text
. Read moresource§fn layout_text_from_unindexed_codepoints(
&self,
unindexed_codepoints: &[char],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock>
fn layout_text_from_unindexed_codepoints(
&self,
unindexed_codepoints: &[char],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock>
Lays out a block of text with the specified scale and options. The
result may be passed to
Graphics2D::draw_text
. Read moresource§fn layout_text_from_codepoints(
&self,
codepoints: &[Codepoint],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock>
fn layout_text_from_codepoints(
&self,
codepoints: &[Codepoint],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock>
Lays out a block of text with the specified scale and options. The
result may be passed to
Graphics2D::draw_text
. Read more