#[repr(C, packed(1))]pub struct MathValueRecord {
pub value: BigEndian<FWord>,
pub device_offset: BigEndian<Nullable<Offset16>>,
}Expand description
The device offset is measured from the beginning of the table that contains the record, not from the record itself.
Fields§
§value: BigEndian<FWord>The X or Y value in design units.
device_offset: BigEndian<Nullable<Offset16>>Offset to the Device table (non-variable font) / VariationIndex table (variable font) for this value, from the beginning of the parent table. May be NULL.
Implementations§
Source§impl MathValueRecord
impl MathValueRecord
Sourcepub fn device_offset(&self) -> Nullable<Offset16>
pub fn device_offset(&self) -> Nullable<Offset16>
Offset to the Device table (non-variable font) / VariationIndex table (variable font) for this value, from the beginning of the parent table. May be NULL.
Sourcepub fn device<'a>(
&self,
data: FontData<'a>,
) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn device<'a>( &self, data: FontData<'a>, ) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
Offset to the Device table (non-variable font) / VariationIndex table (variable font) for this value, from the beginning of the parent table. May be NULL.
The data argument should be retrieved from the parent table
By calling its offset_data method.
Source§impl MathValueRecord
impl MathValueRecord
Sourcepub fn value_for_ppem(&self, data: FontData<'_>, ppem: u16) -> MathValue
pub fn value_for_ppem(&self, data: FontData<'_>, ppem: u16) -> MathValue
The value as read at a size.
data is the data of the table this record was read from, since its
device offset is measured from there rather than from the record.
Trait Implementations§
impl AnyBitPattern for MathValueRecord
Source§impl Clone for MathValueRecord
impl Clone for MathValueRecord
impl Copy for MathValueRecord
Source§impl Debug for MathValueRecord
impl Debug for MathValueRecord
Source§impl FixedSize for MathValueRecord
impl FixedSize for MathValueRecord
Source§const RAW_BYTE_LEN: usize
const RAW_BYTE_LEN: usize
Auto Trait Implementations§
impl Freeze for MathValueRecord
impl RefUnwindSafe for MathValueRecord
impl Send for MathValueRecord
impl Sync for MathValueRecord
impl Unpin for MathValueRecord
impl UnsafeUnpin for MathValueRecord
impl UnwindSafe for MathValueRecord
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.