pub struct Feature<'a> {
data: FontData<'a>,
feature_tag: Tag,
}Expand description
Fields§
§data: FontData<'a>§feature_tag: TagImplementations§
Source§impl<'a> Feature<'a>
impl<'a> Feature<'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 feature_params_offset(&self) -> Nullable<Offset16>
pub fn feature_params_offset(&self) -> Nullable<Offset16>
Offset from start of Feature table to FeatureParams table, if defined for the feature and present, else NULL
Sourcepub fn feature_params(&self) -> Option<Result<FeatureParams<'a>, ReadError>>
pub fn feature_params(&self) -> Option<Result<FeatureParams<'a>, ReadError>>
Attempt to resolve feature_params_offset.
Sourcepub fn lookup_index_count(&self) -> u16
pub fn lookup_index_count(&self) -> u16
Number of LookupList indices for this feature
Sourcepub fn lookup_list_indices(&self) -> &'a [BigEndian<u16>]
pub fn lookup_list_indices(&self) -> &'a [BigEndian<u16>]
Array of indices into the LookupList — zero-based (first lookup is LookupListIndex = 0)
pub(crate) fn feature_tag(&self) -> Tag
pub fn feature_params_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn lookup_index_count_byte_range(&self) -> Range<usize> ⓘ
pub fn lookup_list_indices_byte_range(&self) -> Range<usize> ⓘ
Trait Implementations§
Source§impl<'a> FontReadWithArgs<'a> for Feature<'a>
impl<'a> FontReadWithArgs<'a> for Feature<'a>
Source§impl<'a> MinByteRange<'a> for Feature<'a>
impl<'a> MinByteRange<'a> for Feature<'a>
Auto Trait Implementations§
impl<'a> Freeze for Feature<'a>
impl<'a> RefUnwindSafe for Feature<'a>
impl<'a> Send for Feature<'a>
impl<'a> Sync for Feature<'a>
impl<'a> Unpin for Feature<'a>
impl<'a> UnsafeUnpin for Feature<'a>
impl<'a> UnwindSafe for Feature<'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