pub struct Head {Show 15 fields
pub font_revision: Fixed,
pub checksum_adjustment: u32,
pub magic_number: u32,
pub flags: Flags,
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: Fixed
Set by font manufacturer.
checksum_adjustment: u32
To 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: u32
Set to 0x5F0F3CF5.
flags: Flags
See the flags enum.
units_per_em: u16
Set 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: LongDateTime
Number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.
modified: LongDateTime
Number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.
x_min: i16
Minimum x coordinate across all glyph bounding boxes.
y_min: i16
Minimum y coordinate across all glyph bounding boxes.
x_max: i16
Maximum x coordinate across all glyph bounding boxes.
y_max: i16
Maximum y coordinate across all glyph bounding boxes.
mac_style: MacStyle
Bits identifying the font’s style; see MacStyle
lowest_rec_ppem: u16
Smallest readable size in pixels.
font_direction_hint: i16
Deprecated (Set to 2).
index_to_loc_format: i16
0 for short offsets (Offset16), 1 for long (Offset32).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Head
impl<'de> Deserialize<'de> for Head
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialOrd for Head
impl PartialOrd for Head
Source§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 StructuralPartialEq for Head
Auto Trait Implementations§
impl Freeze for Head
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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.