Struct TextFont

Source
pub struct TextFont {
    pub typeface: TextTypeFace,
    pub panose: Option<Panose>,
    pub pitch_family: Option<i32>,
    pub charset: Option<i32>,
}

Fields§

§typeface: TextTypeFace

Specifies the typeface, or name of the font that is to be used. The typeface is a string name of the specific font that should be used in rendering the presentation. If this font is not available within the font list of the generating application than font substitution logic should be utilized in order to select an alternate font.

§panose: Option<Panose>

Specifies the Panose-1 classification number for the current font using the mechanism defined in §5.2.7.17 of ISO/IEC 14496-22.

§pitch_family: Option<i32>

Specifies the font pitch as well as the font family for the corresponding font. Because the value of this attribute is determined by an octet value this value shall be interpreted as follows:

ValueDescription
0x00DEFAULT PITCH + UNKNOWN FONT FAMILY
0x01FIXED PITCH + UNKNOWN FONT FAMILY
0x02VARIABLE PITCH + UNKNOWN FONT FAMILY
0x10DEFAULT PITCH + ROMAN FONT FAMILY
0x11FIXED PITCH + ROMAN FONT FAMILY
0x12VARIABLE PITCH + ROMAN FONT FAMILY
0x20DEFAULT PITCH + SWISS FONT FAMILY
0x21FIXED PITCH + SWISS FONT FAMILY
0x22VARIABLE PITCH + SWISS FONT FAMILY
0x30DEFAULT PITCH + MODERN FONT FAMILY
0x31FIXED PITCH + MODERN FONT FAMILY
0x32VARIABLE PITCH + MODERN FONT FAMILY
0x40DEFAULT PITCH + SCRIPT FONT FAMILY
0x41FIXED PITCH + SCRIPT FONT FAMILY
0x42VARIABLE PITCH + SCRIPT FONT FAMILY
0x50DEFAULT PITCH + DECORATIVE FONT FAMILY
0x51FIXED PITCH + DECORATIVE FONT FAMIL
0x52VARIABLE PITCH + DECORATIVE FONT FAMILY

This information is determined by querying the font when present and shall not be modified when the font is not available. This information can be used in font substitution logic to locate an appropriate substitute font when this font is not available.

Defaults to 0x00

§Note

Although the attribute name is pitchFamily, the integer value of this attribute specifies the font family with higher 4 bits and the font pitch with lower 4 bits.

§charset: Option<i32>

Specifies the character set which is supported by the parent font. This information can be used in font substitution logic to locate an appropriate substitute font when this font is not available. This information is determined by querying the font when present and shall not be modified when the font is not available.

The value of this attribute shall be interpreted as follows:

ValueDescription
0x00Specifies the ANSI character set. (IANA name iso-8859-1)
0x01Specifies the default character set.
0x02Specifies the Symbol character set. This value specifies that the
characters in the Unicode private use area (U+FF00 to U+FFFF) of the
font should be used to display characters in the range U+0000 to
U+00FF.
0x4DSpecifies a Macintosh (Standard Roman) character set. (IANA name
macintosh)
0x80Specifies the JIS character set. (IANA name shift_jis)
0x81Specifies the Hangul character set. (IANA name ks_c_5601-1987)
0x82Specifies a Johab character set. (IANA name KS C-5601-1992)
0x86Specifies the GB-2312 character set. (IANA name GBK)
0x88Specifies the Chinese Big Five character set. (IANA name Big5)
0xA1Specifies a Greek character set. (IANA name windows-1253)
0xA2Specifies a Turkish character set. (IANA name iso-8859-9)
0xA3Specifies a Vietnamese character set. (IANA name windows-1258)
0xB1Specifies a Hebrew character set. (IANA name windows-1255)
0xB2Specifies an Arabic character set. (IANA name windows-1256)
0xBASpecifies a Baltic character set. (IANA name windows-1257)
0xCCSpecifies a Russian character set. (IANA name windows-1251)
0xDESpecifies a Thai character set. (IANA name windows-874)
0xEESpecifies an Eastern European character set. (IANA name windows-1250)
0xFFSpecifies an OEM character set not defined by ECMA-376.
_Application-defined, can be ignored.

Defaults to 0x01

Implementations§

Trait Implementations§

Source§

impl Clone for TextFont

Source§

fn clone(&self) -> TextFont

Returns a copy 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 TextFont

Source§

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

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

impl PartialEq for TextFont

Source§

fn eq(&self, other: &TextFont) -> 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 StructuralPartialEq for TextFont

Auto Trait Implementations§

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