pub struct AnchorFormat3<'a> {
data: FontData<'a>,
}Expand description
Anchor Table Format 3: Design Units Plus Device or VariationIndex Tables
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> AnchorFormat3<'a>
impl<'a> AnchorFormat3<'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 anchor_format(&self) -> u16
pub fn anchor_format(&self) -> u16
Format identifier, = 3
Sourcepub fn x_coordinate(&self) -> i16
pub fn x_coordinate(&self) -> i16
Horizontal value, in design units
Sourcepub fn y_coordinate(&self) -> i16
pub fn y_coordinate(&self) -> i16
Vertical value, in design units
Sourcepub fn x_device_offset(&self) -> Nullable<Offset16>
pub fn x_device_offset(&self) -> Nullable<Offset16>
Offset to Device table (non-variable font) / VariationIndex table (variable font) for X coordinate, from beginning of Anchor table (may be NULL)
Sourcepub fn x_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn x_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
Attempt to resolve x_device_offset.
Sourcepub fn y_device_offset(&self) -> Nullable<Offset16>
pub fn y_device_offset(&self) -> Nullable<Offset16>
Offset to Device table (non-variable font) / VariationIndex table (variable font) for Y coordinate, from beginning of Anchor table (may be NULL)
Sourcepub fn y_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn y_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
Attempt to resolve y_device_offset.
pub fn anchor_format_byte_range(&self) -> Range<usize> ⓘ
pub fn x_coordinate_byte_range(&self) -> Range<usize> ⓘ
pub fn y_coordinate_byte_range(&self) -> Range<usize> ⓘ
pub fn x_device_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn y_device_offset_byte_range(&self) -> Range<usize> ⓘ
Trait Implementations§
Source§impl<'a> Clone for AnchorFormat3<'a>
impl<'a> Clone for AnchorFormat3<'a>
Source§fn clone(&self) -> AnchorFormat3<'a>
fn clone(&self) -> AnchorFormat3<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more