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
pub fn all_offsets_are_ascending(&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§
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