pub struct RawFace<'a> { /* private fields */ }
Expand description

A raw font face.

You are probably looking for Face. This is a low-level type.

Unlike Face, RawFace parses only face table records. Meaning all you can get from this type is a raw (&[u8]) data of a requested table. Then you can either parse just a singe table from a font/face or populate RawFaceTables manually before passing it to Face::from_raw_tables.

Implementations

Creates a new RawFace from a raw data.

index indicates the specific font face in a font collection. Use fonts_in_collection to get the total number of font faces. Set to 0 if unsure.

While we do reuse FaceParsingError, No*Table errors will not be throws.

Returns the raw data of a selected table.

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

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

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.