Struct write_fonts::tables::post::Post

source ·
pub struct Post {
    pub version: Version16Dot16,
    pub italic_angle: Fixed,
    pub underline_position: FWord,
    pub underline_thickness: FWord,
    pub is_fixed_pitch: u32,
    pub min_mem_type42: u32,
    pub max_mem_type42: u32,
    pub min_mem_type1: u32,
    pub max_mem_type1: u32,
    pub num_glyphs: Option<u16>,
    pub glyph_name_index: Option<Vec<u16>>,
    pub string_data: Option<Vec<PString>>,
}
Expand description

Fields§

§version: Version16Dot16

0x00010000 for version 1.0 0x00020000 for version 2.0 0x00025000 for version 2.5 (deprecated) 0x00030000 for version 3.0

§italic_angle: Fixed

Italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).

§underline_position: FWord

This is the suggested distance of the top of the underline from the baseline (negative values indicate below baseline). The PostScript definition of this FontInfo dictionary key (the y coordinate of the center of the stroke) is not used for historical reasons. The value of the PostScript key may be calculated by subtracting half the underlineThickness from the value of this field.

§underline_thickness: FWord

Suggested values for the underline thickness. In general, the underline thickness should match the thickness of the underscore character (U+005F LOW LINE), and should also match the strikeout thickness, which is specified in the OS/2 table.

§is_fixed_pitch: u32

Set to 0 if the font is proportionally spaced, non-zero if the font is not proportionally spaced (i.e. monospaced).

§min_mem_type42: u32

Minimum memory usage when an OpenType font is downloaded.

§max_mem_type42: u32

Maximum memory usage when an OpenType font is downloaded.

§min_mem_type1: u32

Minimum memory usage when an OpenType font is downloaded as a Type 1 font.

§max_mem_type1: u32

Maximum memory usage when an OpenType font is downloaded as a Type 1 font.

§num_glyphs: Option<u16>

Number of glyphs (this should be the same as numGlyphs in ‘maxp’ table).

§glyph_name_index: Option<Vec<u16>>

Array of indices into the string data. See below for details.

§string_data: Option<Vec<PString>>

Storage for the string data.

Implementations§

source§

impl Post

Construct a new Post

Trait Implementations§

source§

impl Clone for Post

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
source§

impl Debug for Post

Formats the value using the given formatter. Read more
source§

impl Default for Post

Returns the “default value” for a type. Read more
source§

impl<'a> FontRead<'a> for Post

Read an instace of Self from the provided data, performing validation. Read more
source§

impl FontWrite for Post

Write our data and information about offsets into this TableWriter.
source§

impl Validate for Post

Validate this table. Read more
Ensure that this table is well-formed, reporting any errors. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Post

§

impl Send for Post

§

impl Sync for Post

§

impl Unpin for Post

§

impl UnwindSafe for Post

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere
    T: Clone,

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

impl<U, T> ToOwnedObj<U> for Twhere
    U: FromObjRef<T>,

Convert this type into T, using the provided data to resolve any offsets.
source§

impl<U, T> ToOwnedTable<U> for Twhere
    U: FromTableRef<T>,

source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

The type returned in the event of a conversion error.
Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

The type returned in the event of a conversion error.
Performs the conversion.