pub struct HmtxExtended<'a> {
data: TableDataRef<'a, HmtxExtendedFixedHeader>,
number_of_h_metrics: u32,
}Expand description
HMTX horizontal metrics (ISO/IEC 14496-22:2026, 5.1.11).
Fields§
§data: TableDataRef<'a, HmtxExtendedFixedHeader>§number_of_h_metrics: u32Implementations§
Source§impl<'a> HmtxExtended<'a>
impl<'a> HmtxExtended<'a>
Source§impl<'a> HmtxExtended<'a>
impl<'a> HmtxExtended<'a>
pub const MIN_SIZE: usize = 0
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a, Args = ()>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a, Args = ()>>( &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
just use the base type directly
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.
pub fn h_metrics(&self) -> &'a [LongMetric]
pub fn left_side_bearings(&self) -> &'a [BigEndian<i16>]
pub(crate) fn number_of_h_metrics(&self) -> u32
pub fn h_metrics_byte_range(&self) -> Range<usize> ⓘ
pub fn left_side_bearings_byte_range(&self) -> Range<usize> ⓘ
Trait Implementations§
Source§impl<'a> Clone for HmtxExtended<'a>
impl<'a> Clone for HmtxExtended<'a>
Source§fn clone(&self) -> HmtxExtended<'a>
fn clone(&self) -> HmtxExtended<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for HmtxExtended<'_>
impl Default for HmtxExtended<'_>
Source§impl<'a> FontRead<'a> for HmtxExtended<'a>
impl<'a> FontRead<'a> for HmtxExtended<'a>
Source§impl<'a> From<HmtxExtended<'a>> for GlyphMetricRecords<'a>
impl<'a> From<HmtxExtended<'a>> for GlyphMetricRecords<'a>
Source§fn from(table: HmtxExtended<'a>) -> Self
fn from(table: HmtxExtended<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> MinByteRange<'a> for HmtxExtended<'a>
impl<'a> MinByteRange<'a> for HmtxExtended<'a>
Source§impl TopLevelTable for HmtxExtended<'_>
impl TopLevelTable for HmtxExtended<'_>
Auto Trait Implementations§
impl<'a> Freeze for HmtxExtended<'a>
impl<'a> RefUnwindSafe for HmtxExtended<'a>
impl<'a> Send for HmtxExtended<'a>
impl<'a> Sync for HmtxExtended<'a>
impl<'a> Unpin for HmtxExtended<'a>
impl<'a> UnsafeUnpin for HmtxExtended<'a>
impl<'a> UnwindSafe for HmtxExtended<'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