pub struct Trak<'a> {
data: FontData<'a>,
}Expand description
The tracking (trak) table.
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> Trak<'a>
impl<'a> Trak<'a>
pub const MIN_SIZE: usize
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>
Resolve the provided offset from the start of this table.
Sourcepub fn offset_data(&self) -> FontData<'a>
pub fn offset_data(&self) -> FontData<'a>
Return a reference to this table’s raw data.
We use this in the compile crate to resolve offsets.
Sourcepub fn shape(&self) -> &Self
👎Deprecated: just use the base type directly
pub fn shape(&self) -> &Self
Return a reference to the table’s ‘Shape’ struct.
This is a low level implementation detail, but it can be useful in some cases where you want to know things about a table’s layout, such as the byte offsets of specific fields.
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Version number of the tracking table (0x00010000 for the current version).
Sourcepub fn horiz_offset(&self) -> Nullable<Offset16>
pub fn horiz_offset(&self) -> Nullable<Offset16>
Offset from start of tracking table to TrackData for horizontal text (or 0 if none).
Sourcepub fn horiz(&self) -> Option<Result<TrackData<'a>, ReadError>>
pub fn horiz(&self) -> Option<Result<TrackData<'a>, ReadError>>
Attempt to resolve horiz_offset.
Sourcepub fn vert_offset(&self) -> Nullable<Offset16>
pub fn vert_offset(&self) -> Nullable<Offset16>
Offset from start of tracking table to TrackData for vertical text (or 0 if none).
pub fn version_byte_range(&self) -> Range<usize> ⓘ
pub fn format_byte_range(&self) -> Range<usize> ⓘ
pub fn horiz_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn vert_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn reserved_byte_range(&self) -> Range<usize> ⓘ
Trait Implementations§
Source§impl<'a> MinByteRange<'a> for Trak<'a>
impl<'a> MinByteRange<'a> for Trak<'a>
Auto Trait Implementations§
impl<'a> Freeze for Trak<'a>
impl<'a> RefUnwindSafe for Trak<'a>
impl<'a> Send for Trak<'a>
impl<'a> Sync for Trak<'a>
impl<'a> Unpin for Trak<'a>
impl<'a> UnsafeUnpin for Trak<'a>
impl<'a> UnwindSafe for Trak<'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