Enum write_fonts::tables::layout::DeltaFormat
source · #[repr(u16)]pub enum DeltaFormat {
Local2BitDeltas = 1,
Local4BitDeltas = 2,
Local8BitDeltas = 3,
VariationIndex = 32_768,
// some variants omitted
}Expand description
Device delta formats
Variants§
Local2BitDeltas = 1
Signed 2-bit value, 8 values per uint16
Local4BitDeltas = 2
Signed 4-bit value, 4 values per uint16
Local8BitDeltas = 3
Signed 8-bit value, 2 values per uint16
VariationIndex = 32_768
VariationIndex table, contains a delta-set index pair.
Implementations§
source§impl DeltaFormat
impl DeltaFormat
sourcepub fn new(raw: u16) -> DeltaFormat
pub fn new(raw: u16) -> DeltaFormat
Create from a raw scalar.
This will never fail; unknown values will be mapped to the Unknown variant
Trait Implementations§
source§impl Clone for DeltaFormat
impl Clone for DeltaFormat
source§fn clone(&self) -> DeltaFormat
fn clone(&self) -> DeltaFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for DeltaFormat
impl Debug for DeltaFormat
source§impl Default for DeltaFormat
impl Default for DeltaFormat
source§fn default() -> DeltaFormat
fn default() -> DeltaFormat
Returns the “default value” for a type. Read more
source§impl FontWrite for DeltaFormat
impl FontWrite for DeltaFormat
source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
Write our data and information about offsets into this TableWriter.
source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
The type of this table. Read more
source§impl Hash for DeltaFormat
impl Hash for DeltaFormat
source§impl Ord for DeltaFormat
impl Ord for DeltaFormat
source§fn cmp(&self, other: &DeltaFormat) -> Ordering
fn cmp(&self, other: &DeltaFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for DeltaFormat
impl PartialEq for DeltaFormat
source§fn eq(&self, other: &DeltaFormat) -> bool
fn eq(&self, other: &DeltaFormat) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for DeltaFormat
impl PartialOrd for DeltaFormat
source§fn partial_cmp(&self, other: &DeltaFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &DeltaFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Scalar for DeltaFormat
impl Scalar for DeltaFormat
source§fn from_raw(raw: <DeltaFormat as Scalar>::Raw) -> DeltaFormat
fn from_raw(raw: <DeltaFormat as Scalar>::Raw) -> DeltaFormat
Create an instance of this type from raw big-endian bytes
impl Copy for DeltaFormat
impl Eq for DeltaFormat
impl StructuralPartialEq for DeltaFormat
Auto Trait Implementations§
impl RefUnwindSafe for DeltaFormat
impl Send for DeltaFormat
impl Sync for DeltaFormat
impl Unpin for DeltaFormat
impl UnwindSafe for DeltaFormat
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<T> FixedSize for Twhere
T: Scalar,
impl<T> FixedSize for Twhere
T: Scalar,
source§const RAW_BYTE_LEN: usize = _
const RAW_BYTE_LEN: usize = _
The raw size of this type, in bytes. Read more
source§impl<T> FromObjRef<BigEndian<T>> for T
impl<T> FromObjRef<BigEndian<T>> for T
source§fn from_obj_ref(from: &BigEndian<T>, _: FontData<'_>) -> T
fn from_obj_ref(from: &BigEndian<T>, _: FontData<'_>) -> T
Convert
from to an instance of Self, using the provided data to resolve offsets.source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.