Struct composable::views::text::Font
source · pub struct Font<'a> { /* private fields */ }
Available on crate features
unstable
and views
only.Expand description
Implementations§
source§impl<'a> Font<'a>
impl<'a> Font<'a>
sourcepub fn full_name(&self) -> Option<String>
pub fn full_name(&self) -> Option<String>
Full font name that reflects all family and relevant subfamily descriptors.
sourcepub fn identifier(&self) -> Option<String>
pub fn identifier(&self) -> Option<String>
Unique font identifier
sourcepub fn version(&self) -> Option<String>
pub fn version(&self) -> Option<String>
Should begin with the syntax “Version N.M” (upper case, lower case, or mixed, with a space between “Version” and the number).
sourcepub fn capital_height(&self) -> f32
pub fn capital_height(&self) -> f32
Capital height,
source§impl<'a> Font<'a>
impl<'a> Font<'a>
sourcepub fn from(data: &'a [u8]) -> Option<FontConfig<'_>>
pub fn from(data: &'a [u8]) -> Option<FontConfig<'_>>
Create a Font
from the raw font data.
sourcepub fn from_collection(data: &'a [u8], index: u32) -> Option<FontConfig<'_>>
pub fn from_collection(data: &'a [u8], index: u32) -> Option<FontConfig<'_>>
Create a Font
from a font collection.
Returns the font at index
, if any
Auto Trait Implementations§
impl<'a> Freeze for Font<'a>
impl<'a> !RefUnwindSafe for Font<'a>
impl<'a> Send for Font<'a>
impl<'a> Sync for Font<'a>
impl<'a> Unpin for Font<'a>
impl<'a> !UnwindSafe for Font<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more