#[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
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
.