#[repr(C, packed(1))]pub struct LookupConditionRecord {
pub condition_offset: BigEndian<Nullable<Offset32>>,
pub lookup_index_list_offset: BigEndian<Offset32>,
}Expand description
Lookups to include when a condition is true.
Fields§
§condition_offset: BigEndian<Nullable<Offset32>>Offset from the beginning of FeatureLookups; null means true.
lookup_index_list_offset: BigEndian<Offset32>Offset from the beginning of FeatureLookups.
Implementations§
Source§impl LookupConditionRecord
impl LookupConditionRecord
Sourcepub fn evaluate(
&self,
data: FontData<'_>,
coords: &[F2Dot14],
delta: impl FnMut(u32) -> Result<f64, Error>,
) -> Result<bool, Error>
pub fn evaluate( &self, data: FontData<'_>, coords: &[F2Dot14], delta: impl FnMut(u32) -> Result<f64, Error>, ) -> Result<bool, Error>
Evaluates this record’s condition, relative to its FeatureLookups table.
A null offset is unconditional. See Condition::evaluate for
variation-delta resolution and error handling.
Source§impl LookupConditionRecord
impl LookupConditionRecord
Sourcepub fn condition_offset(&self) -> Nullable<Offset32>
pub fn condition_offset(&self) -> Nullable<Offset32>
Offset from the beginning of FeatureLookups; null means true.
Sourcepub fn condition<'a>(
&self,
data: FontData<'a>,
) -> Option<Result<Condition<'a>, ReadError>>
pub fn condition<'a>( &self, data: FontData<'a>, ) -> Option<Result<Condition<'a>, ReadError>>
Offset from the beginning of FeatureLookups; null means true.
The data argument should be retrieved from the parent table
By calling its offset_data method.
Sourcepub fn lookup_index_list_offset(&self) -> Offset32
pub fn lookup_index_list_offset(&self) -> Offset32
Offset from the beginning of FeatureLookups.
Sourcepub fn lookup_index_list<'a>(
&self,
data: FontData<'a>,
) -> Result<LookupIndexList<'a>, ReadError>
pub fn lookup_index_list<'a>( &self, data: FontData<'a>, ) -> Result<LookupIndexList<'a>, ReadError>
Offset from the beginning of FeatureLookups.
The data argument should be retrieved from the parent table
By calling its offset_data method.
Trait Implementations§
impl AnyBitPattern for LookupConditionRecord
Source§impl Clone for LookupConditionRecord
impl Clone for LookupConditionRecord
Source§fn clone(&self) -> LookupConditionRecord
fn clone(&self) -> LookupConditionRecord
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 moreimpl Copy for LookupConditionRecord
Source§impl Debug for LookupConditionRecord
impl Debug for LookupConditionRecord
Source§impl FixedSize for LookupConditionRecord
impl FixedSize for LookupConditionRecord
Source§const RAW_BYTE_LEN: usize
const RAW_BYTE_LEN: usize
The raw size of this type, in bytes. Read more
Auto Trait Implementations§
impl Freeze for LookupConditionRecord
impl RefUnwindSafe for LookupConditionRecord
impl Send for LookupConditionRecord
impl Sync for LookupConditionRecord
impl Unpin for LookupConditionRecord
impl UnsafeUnpin for LookupConditionRecord
impl UnwindSafe for LookupConditionRecord
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
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
If this function returns true, then it must be valid to reinterpret
bits
as &Self.