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: 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: u16

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: u16

see somewhere else

§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§

Construct a new Head

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Read an instace of Self from the provided data, performing validation. Read more
Write our data and information about offsets into this TableWriter.
Validate this table. Read more
Ensure that this table is well-formed, reporting any errors. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Convert this type into T, using the provided data to resolve any offsets.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.