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: u16,
pub lowest_rec_ppem: u16,
pub font_direction_hint: i16,
pub index_to_loc_format: i16,
}Expand description
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: u16see 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)
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<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.