Struct speedy2d::font::Font [−][src]
A struct representing a font.
Implementations
impl Font
[src]
pub fn new(bytes: &[u8]) -> Result<Font, BacktraceError<ErrorMessage>>
[src]
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
impl Clone for Font
[src]
impl Debug for Font
[src]
impl Eq for Font
[src]
impl Hash for Font
[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<Font> for Font
[src]
impl TextLayout for Font
[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 Font
impl !Send for Font
impl !Sync for Font
impl Unpin for Font
impl UnwindSafe for Font
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>,