Struct write_fonts::tables::head::Head
source · pub struct Head {Show 15 fields
pub font_revision: Fixed,
pub checksum_adjustment: u32,
pub magic_number: u32,
pub flags: u16,
pub units_per_em: u16,
pub created: LongDateTime,
pub modified: LongDateTime,
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: i16,
}Expand description
The head (font header) table.
Fields§
§font_revision: FixedSet by font manufacturer.
checksum_adjustment: u32To compute: set it to 0, sum the entire font as uint32, then store 0xB1B0AFBA - sum. If the font is used as a component in a font collection file, the value of this field will be invalidated by changes to the file structure and font table directory, and must be ignored.
magic_number: u32Set to 0x5F0F3CF5.
flags: u16See the flags enum
units_per_em: u16Set to a value from 16 to 16384. Any value in this range is valid. In fonts that have TrueType outlines, a power of 2 is recommended as this allows performance optimizations in some rasterizers.
created: LongDateTimeNumber of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.
modified: LongDateTimeNumber of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.
x_min: i16Minimum x coordinate across all glyph bounding boxes.
y_min: i16Minimum y coordinate across all glyph bounding boxes.
x_max: i16Maximum x coordinate across all glyph bounding boxes.
y_max: i16Maximum y coordinate across all glyph bounding boxes.
mac_style: MacStylesee somewhere else
lowest_rec_ppem: u16Smallest readable size in pixels.
font_direction_hint: i16Deprecated (Set to 2).
index_to_loc_format: i160 for short offsets (Offset16), 1 for long (Offset32).
Implementations§
Trait Implementations§
source§impl FontWrite for Head
impl FontWrite for Head
source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
source§impl Ord for Head
impl Ord for Head
source§impl PartialEq for Head
impl PartialEq for Head
source§impl PartialOrd for Head
impl PartialOrd for Head
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Validate for Head
impl Validate for Head
source§fn validate_impl(&self, _ctx: &mut ValidationCtx)
fn validate_impl(&self, _ctx: &mut ValidationCtx)
impl Eq for Head
impl StructuralEq for Head
impl StructuralPartialEq for Head
Auto Trait Implementations§
impl RefUnwindSafe for Head
impl Send for Head
impl Sync for Head
impl Unpin for Head
impl UnwindSafe for Head
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
§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
§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
key and return true if they are equal.source§impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
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
T, using the provided data to resolve any offsets.