Struct owned_ttf_parser::OwnedFace
source · pub struct OwnedFace(Pin<Box<SelfRefVecFace>>);
Expand description
An owned version of font Face
.
Tuple Fields§
§0: Pin<Box<SelfRefVecFace>>
Implementations§
source§impl OwnedFace
impl OwnedFace
sourcepub fn from_vec(data: Vec<u8>, index: u32) -> Result<Self, FaceParsingError>
pub fn from_vec(data: Vec<u8>, index: u32) -> Result<Self, FaceParsingError>
Creates an OwnedFace
from owned data.
You can set index for font collections. For simple ttf fonts set index to 0.
§Example
let owned_face = OwnedFace::from_vec(owned_font_data, 0).unwrap();
pub(crate) fn pre_parse_subtables(self) -> PreParsedSubtables<'static, Self>
Trait Implementations§
source§impl AsFaceRef for &OwnedFace
impl AsFaceRef for &OwnedFace
source§fn as_face_ref(&self) -> &Face<'_>
fn as_face_ref(&self) -> &Face<'_>
Convert to a
Face
reference.source§impl AsFaceRef for OwnedFace
impl AsFaceRef for OwnedFace
source§fn as_face_ref(&self) -> &Face<'_>
fn as_face_ref(&self) -> &Face<'_>
Convert to a
Face
reference.Auto Trait Implementations§
impl Freeze for OwnedFace
impl RefUnwindSafe for OwnedFace
impl Send for OwnedFace
impl Sync for OwnedFace
impl Unpin for OwnedFace
impl UnwindSafe for OwnedFace
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