#[repr(C, packed(1))]pub struct FeatureName {
pub feature: BigEndian<u16>,
pub n_settings: BigEndian<u16>,
pub setting_table_offset: BigEndian<Offset32>,
pub feature_flags: BigEndian<u16>,
pub name_index: BigEndian<NameId>,
}
Expand description
Type, flags and names for a feature.
Fields§
§feature: BigEndian<u16>
Feature type.
n_settings: BigEndian<u16>
The number of records in the setting name array.
setting_table_offset: BigEndian<Offset32>
Offset in bytes from the beginning of this table to this feature’s setting name array. The actual type of record this offset refers to will depend on the exclusivity value, as described below.
feature_flags: BigEndian<u16>
Flags associated with the feature type.
name_index: BigEndian<NameId>
The name table index for the feature’s name.
Implementations§
source§impl FeatureName
impl FeatureName
sourcepub fn n_settings(&self) -> u16
pub fn n_settings(&self) -> u16
The number of records in the setting name array.
sourcepub fn setting_table_offset(&self) -> Offset32
pub fn setting_table_offset(&self) -> Offset32
Offset in bytes from the beginning of this table to this feature’s setting name array. The actual type of record this offset refers to will depend on the exclusivity value, as described below.
sourcepub fn setting_table<'a>(
&self,
data: FontData<'a>,
) -> Result<SettingNameArray<'a>, ReadError>
pub fn setting_table<'a>( &self, data: FontData<'a>, ) -> Result<SettingNameArray<'a>, ReadError>
Offset in bytes from the beginning of this table to this feature’s setting name array. The actual type of record this offset refers to will depend on the exclusivity value, as described below.
The data
argument should be retrieved from the parent table
By calling its offset_data
method.
sourcepub fn feature_flags(&self) -> u16
pub fn feature_flags(&self) -> u16
Flags associated with the feature type.
sourcepub fn name_index(&self) -> NameId
pub fn name_index(&self) -> NameId
The name table index for the feature’s name.
source§impl FeatureName
impl FeatureName
sourcepub fn is_exclusive(&self) -> bool
pub fn is_exclusive(&self) -> bool
Returns true if the feature settings are mutually exclusive.
sourcepub fn default_setting_index(&self) -> u16
pub fn default_setting_index(&self) -> u16
Returns the index of the default setting for the feature.
Trait Implementations§
source§impl Clone for FeatureName
impl Clone for FeatureName
source§fn clone(&self) -> FeatureName
fn clone(&self) -> FeatureName
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FeatureName
impl Debug for FeatureName
source§impl FixedSize for FeatureName
impl FixedSize for FeatureName
source§const RAW_BYTE_LEN: usize = 12usize
const RAW_BYTE_LEN: usize = 12usize
source§impl<'a> SomeRecord<'a> for FeatureName
impl<'a> SomeRecord<'a> for FeatureName
fn traverse(self, data: FontData<'a>) -> RecordResolver<'a>
impl AnyBitPattern for FeatureName
impl Copy for FeatureName
Auto Trait Implementations§
impl Freeze for FeatureName
impl RefUnwindSafe for FeatureName
impl Send for FeatureName
impl Sync for FeatureName
impl Unpin for FeatureName
impl UnwindSafe for FeatureName
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
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)