pub struct HeadTable {Show 18 fields
pub major_version: u16,
pub minor_version: u16,
pub font_revision: Fixed,
pub check_sum_adjustment: u32,
pub magic_number: u32,
pub flags: u16,
pub units_per_em: u16,
pub created: i64,
pub modified: i64,
pub x_min: i16,
pub y_min: i16,
pub x_max: i16,
pub y_max: i16,
pub mac_style: MacStyle,
pub lowest_rec_ppem: u16,
pub font_direction_hint: i16,
pub index_to_loc_format: IndexToLocFormat,
pub glyph_data_format: i16,
}
Expand description
Fields§
§major_version: u16
§minor_version: u16
§font_revision: Fixed
§check_sum_adjustment: u32
§magic_number: u32
§flags: u16
§units_per_em: u16
§created: i64
§modified: i64
§x_min: i16
§y_min: i16
§x_max: i16
§y_max: i16
§mac_style: MacStyle
§lowest_rec_ppem: u16
§font_direction_hint: i16
§index_to_loc_format: IndexToLocFormat
§glyph_data_format: i16
Implementations§
Trait Implementations§
source§impl PartialEq for HeadTable
impl PartialEq for HeadTable
source§impl PartialOrd for HeadTable
impl PartialOrd for HeadTable
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 ReadBinary for HeadTable
impl ReadBinary for HeadTable
source§impl WriteBinary<&HeadTable> for HeadTable
impl WriteBinary<&HeadTable> for HeadTable
source§fn write<C: WriteContext>(
ctxt: &mut C,
table: &HeadTable,
) -> Result<Self::Output, WriteError>
fn write<C: WriteContext>( ctxt: &mut C, table: &HeadTable, ) -> Result<Self::Output, WriteError>
Writes the table to the WriteContext
and returns a placeholder to the
check_sum_adjustment
field.
The check_sum_adjustment
field requires special handling to calculate. See:
https://docs.microsoft.com/en-us/typography/opentype/spec/head
§type Output = Placeholder<U32Be, u32>
type Output = Placeholder<U32Be, u32>
The type of the value returned by
write
.impl StructuralPartialEq for HeadTable
Auto Trait Implementations§
impl Freeze for HeadTable
impl RefUnwindSafe for HeadTable
impl Send for HeadTable
impl Sync for HeadTable
impl Unpin for HeadTable
impl UnwindSafe for HeadTable
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> ReadBinaryDep for Twhere
T: ReadBinary,
impl<T> ReadBinaryDep for Twhere
T: ReadBinary,
type Args<'a> = ()
type HostType<'a> = <T as ReadBinary>::HostType<'a>
fn read_dep<'a>( ctxt: &mut ReadCtxt<'a>, _: <T as ReadBinaryDep>::Args<'_>, ) -> Result<<T as ReadBinaryDep>::HostType<'a>, ParseError>
source§impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
§type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by
write_dep
.source§fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
Write the binary representation of Self to
ctxt
.