Os2

Struct Os2 

Source
pub struct Os2 {
Show 38 fields pub x_avg_char_width: i16, pub us_weight_class: u16, pub us_width_class: u16, pub fs_type: u16, pub y_subscript_x_size: i16, pub y_subscript_y_size: i16, pub y_subscript_x_offset: i16, pub y_subscript_y_offset: i16, pub y_superscript_x_size: i16, pub y_superscript_y_size: i16, pub y_superscript_x_offset: i16, pub y_superscript_y_offset: i16, pub y_strikeout_size: i16, pub y_strikeout_position: i16, pub s_family_class: i16, pub panose_10: [u8; 10], pub ul_unicode_range_1: u32, pub ul_unicode_range_2: u32, pub ul_unicode_range_3: u32, pub ul_unicode_range_4: u32, pub ach_vend_id: Tag, pub fs_selection: SelectionFlags, pub us_first_char_index: u16, pub us_last_char_index: u16, pub s_typo_ascender: i16, pub s_typo_descender: i16, pub s_typo_line_gap: i16, pub us_win_ascent: u16, pub us_win_descent: u16, pub ul_code_page_range_1: Option<u32>, pub ul_code_page_range_2: Option<u32>, pub sx_height: Option<i16>, pub s_cap_height: Option<i16>, pub us_default_char: Option<u16>, pub us_break_char: Option<u16>, pub us_max_context: Option<u16>, pub us_lower_optical_point_size: Option<u16>, pub us_upper_optical_point_size: Option<u16>,
}
Expand description

Fields§

§x_avg_char_width: i16

Average weighted escapement.

The Average Character Width parameter specifies the arithmetic average of the escapement (width) of all non-zero width glyphs in the font.

§us_weight_class: u16

Weight class.

Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. Values from 1 to 1000 are valid.

§us_width_class: u16

Width class.

Indicates a relative change from the normal aspect ratio (width to height ratio) as specified by a font designer for the glyphs in a font.

§fs_type: u16

Type flags.

Indicates font embedding licensing rights for the font.

§y_subscript_x_size: i16

The recommended horizontal size in font design units for subscripts for this font.

§y_subscript_y_size: i16

The recommended vertical size in font design units for subscripts for this font.

§y_subscript_x_offset: i16

The recommended horizontal offset in font design units for subscripts for this font.

§y_subscript_y_offset: i16

The recommended vertical offset in font design units for subscripts for this font.

§y_superscript_x_size: i16

The recommended horizontal size in font design units for superscripts for this font.

§y_superscript_y_size: i16

The recommended vertical size in font design units for superscripts for this font.

§y_superscript_x_offset: i16

The recommended horizontal offset in font design units for superscripts for this font.

§y_superscript_y_offset: i16

The recommended vertical offset in font design units for superscripts for this font.

§y_strikeout_size: i16

Thickness of the strikeout stroke in font design units.

§y_strikeout_position: i16

The position of the top of the strikeout stroke relative to the baseline in font design units.

§s_family_class: i16

Font-family class and subclass. This parameter is a classification of font-family design.

§panose_10: [u8; 10]

PANOSE classification number.

Additional specifications are required for PANOSE to classify non-Latin character sets.

§ul_unicode_range_1: u32

Unicode Character Range.

Unicode Character Range (bits 0-31).

§ul_unicode_range_2: u32

Unicode Character Range (bits 32-63).

§ul_unicode_range_3: u32

Unicode Character Range (bits 64-95).

§ul_unicode_range_4: u32

Unicode Character Range (bits 96-127).

§ach_vend_id: Tag

Font Vendor Identification.

The four-character identifier for the vendor of the given type face.

§fs_selection: SelectionFlags

Font selection flags.

Contains information concerning the nature of the font patterns.

§us_first_char_index: u16

The minimum Unicode index (character code) in this font.

§us_last_char_index: u16

The maximum Unicode index (character code) in this font.

§s_typo_ascender: i16

The typographic ascender for this font.

§s_typo_descender: i16

The typographic descender for this font.

§s_typo_line_gap: i16

The typographic line gap for this font.

§us_win_ascent: u16

The “Windows ascender” metric.

This should be used to specify the height above the baseline for a clipping region.

§us_win_descent: u16

The “Windows descender” metric.

This should be used to specify the vertical extent below the baseline for a clipping region.

§ul_code_page_range_1: Option<u32>

Code page character range bits 0-31.

§ul_code_page_range_2: Option<u32>

Code page character range bits 32-63.

§sx_height: Option<i16>

This metric specifies the distance between the baseline and the approximate height of non-ascending lowercase letters measured in FUnits.

§s_cap_height: Option<i16>

This metric specifies the distance between the baseline and the approximate height of uppercase letters measured in FUnits.

§us_default_char: Option<u16>

This is the Unicode codepoint, in UTF-16 encoding, of a character that can be used for a default glyph.

§us_break_char: Option<u16>

This is the Unicode codepoint, in UTF-16 encoding, of a character that can be used as a default break character.

§us_max_context: Option<u16>

This field is used for fonts with multiple optical styles.

§us_lower_optical_point_size: Option<u16>

This field is used for fonts with multiple optical styles.

§us_upper_optical_point_size: Option<u16>

This field is used for fonts with multiple optical styles.

Trait Implementations§

Source§

impl Clone for Os2

Source§

fn clone(&self) -> Os2

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Os2

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

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

impl Default for Os2

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Os2

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'a> FontRead<'a> for Os2

Source§

fn read(data: FontData<'a>) -> Result<Self, ReadError>

Read an instance of Self from the provided data, performing validation. Read more
Source§

impl FontWrite for Os2

Source§

fn write_into(&self, writer: &mut TableWriter)

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

fn table_type(&self) -> TableType

The type of this table. Read more
Source§

impl Hash for Os2

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Os2

Source§

fn cmp(&self, other: &Os2) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Os2

Source§

fn eq(&self, other: &Os2) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Os2

Source§

fn partial_cmp(&self, other: &Os2) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Os2

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TopLevelTable for Os2

Source§

const TAG: Tag

The table’s tag.
Source§

impl Validate for Os2

Source§

fn validate_impl(&self, ctx: &mut ValidationCtx)

Validate this table. Read more
Source§

fn validate(&self) -> Result<(), ValidationReport>

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

impl Eq for Os2

Source§

impl StructuralPartialEq for Os2

Auto Trait Implementations§

§

impl Freeze for Os2

§

impl RefUnwindSafe for Os2

§

impl Send for Os2

§

impl Sync for Os2

§

impl Unpin for Os2

§

impl UnwindSafe for Os2

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<'a, T> FontReadWithArgs<'a> for T
where T: FontRead<'a>,

Source§

fn read_with_args( data: FontData<'a>, _: &<T as ReadArgs>::Args, ) -> Result<T, ReadError>

read an item, using the provided args. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<'a, T> ReadArgs for T
where T: FontRead<'a>,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

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

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

Source§

fn to_owned_table(&self) -> U

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,