Struct speedy2d::font::FontFamily [−][src]
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
impl FontFamily
[src]
#[must_use]pub fn new(fonts: Vec<Font>) -> Self
[src]
Instantiates a new font family, containing the specified fonts in decreasing order of priority.
Trait Implementations
impl Clone for FontFamily
[src]
fn clone(&self) -> FontFamily
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FontFamily
[src]
impl Eq for FontFamily
[src]
impl Hash for FontFamily
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<FontFamily> for FontFamily
[src]
fn eq(&self, other: &FontFamily) -> bool
[src]
fn ne(&self, other: &FontFamily) -> bool
[src]
impl StructuralEq for FontFamily
[src]
impl StructuralPartialEq for FontFamily
[src]
impl TextLayout for FontFamily
[src]
fn lookup_glyph_for_codepoint(&self, codepoint: char) -> Option<FontGlyph>
[src]
#[must_use]fn layout_text(
&self,
text: &str,
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
[src]
&self,
text: &str,
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
#[must_use]fn layout_text_from_unindexed_codepoints(
&self,
unindexed_codepoints: &[char],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
[src]
&self,
unindexed_codepoints: &[char],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
#[must_use]fn layout_text_from_codepoints(
&self,
codepoints: &[Codepoint],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
[src]
&self,
codepoints: &[Codepoint],
scale: f32,
options: TextOptions
) -> Rc<FormattedTextBlock> where
Self: Sized,
Auto Trait Implementations
impl !RefUnwindSafe for FontFamily
impl !Send for FontFamily
impl !Sync for FontFamily
impl Unpin for FontFamily
impl !UnwindSafe for FontFamily
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,