pub enum Loca<'a> {
Short(&'a [BigEndian<u16>]),
Long(&'a [BigEndian<u32>]),
}
Expand description
The loca table.
Variants§
Implementations§
source§impl<'a> Loca<'a>
impl<'a> Loca<'a>
pub fn read(data: FontData<'a>, is_long: bool) -> Result<Self, ReadError>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn get_raw(&self, idx: usize) -> Option<u32>
pub fn get_raw(&self, idx: usize) -> Option<u32>
Attempt to return the offset for a given glyph id.
pub fn get_glyf( &self, gid: GlyphId, glyf: &Glyf<'a>, ) -> Result<Option<Glyph<'a>>, ReadError>
Trait Implementations§
source§impl<'a> FontReadWithArgs<'a> for Loca<'a>
impl<'a> FontReadWithArgs<'a> for Loca<'a>
source§impl<'a> SomeArray<'a> for Loca<'a>
impl<'a> SomeArray<'a> for Loca<'a>
Auto Trait Implementations§
impl<'a> Freeze for Loca<'a>
impl<'a> RefUnwindSafe for Loca<'a>
impl<'a> Send for Loca<'a>
impl<'a> Sync for Loca<'a>
impl<'a> Unpin for Loca<'a>
impl<'a> UnwindSafe for Loca<'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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)