Enum tfm::pl::ast::FontDimension

source ·
pub enum FontDimension {
    NamedParam(NamedParameter, SingleValue<Number>),
    IndexedParam(TupleValue<ParameterNumber, Number>),
    Comment(String),
}
Expand description

An element of a FONTDIMEN property list.

The property names allowed in a FONTDIMEN property list correspond to various TeX parameters, each of which has a (real) numeric value. All of the parameters except SLANT are in design units.

The documentation on each variant is based on the documentation in PFtoTF.2014.11.

Variants§

§

NamedParam(NamedParameter, SingleValue<Number>)

A named parameters like (SLANT R -.25).

§

IndexedParam(TupleValue<ParameterNumber, Number>)

The notation PARAMETER n provides another way to specify the nth parameter; for example, (PARAMETER D 1 R −.25) is another way to specify that the SLANT is −0.25. The value of n must be strictly positive and less than max param words.

§

Comment(String)

A comment that is ignored.

Implementations§

source§

impl FontDimension

source

pub const SLANT: &'static str = "SLANT"

source

pub const SPACE: &'static str = "SPACE"

source

pub const STRETCH: &'static str = "STRETCH"

source

pub const SHRINK: &'static str = "SHRINK"

source

pub const X_HEIGHT: &'static str = "XHEIGHT"

source

pub const QUAD: &'static str = "QUAD"

source

pub const EXTRA_SPACE: &'static str = "EXTRASPACE"

source

pub const NUM_1: &'static str = "NUM1"

source

pub const NUM_2: &'static str = "NUM2"

source

pub const NUM_3: &'static str = "NUM3"

source

pub const DENOM_1: &'static str = "DENOM1"

source

pub const DENOM_2: &'static str = "DENOM2"

source

pub const SUP_1: &'static str = "SUP1"

source

pub const SUP_2: &'static str = "SUP2"

source

pub const SUP_3: &'static str = "SUP3"

source

pub const SUB_1: &'static str = "SUB1"

source

pub const SUB_2: &'static str = "SUB2"

source

pub const SUP_DROP: &'static str = "SUPDROP"

source

pub const SUB_DROP: &'static str = "SUBDROP"

source

pub const DELIM_1: &'static str = "DELIM1"

source

pub const DELIM_2: &'static str = "DELIM2"

source

pub const AXIS_HEIGHT: &'static str = "AXISHEIGHT"

source

pub const DEFAULT_RULE_THICKNESS: &'static str = "DEFAULTRULETHICKNESS"

source

pub const BIG_OP_SPACING_1: &'static str = "BIGOPSPACING1"

source

pub const BIG_OP_SPACING_2: &'static str = "BIGOPSPACING2"

source

pub const BIG_OP_SPACING_3: &'static str = "BIGOPSPACING3"

source

pub const BIG_OP_SPACING_4: &'static str = "BIGOPSPACING4"

source

pub const BIG_OP_SPACING_5: &'static str = "BIGOPSPACING5"

source

pub const PARAMETER: &'static str = "PARAMETER"

source

pub const ALL_PROPERTY_NAMES: &'static [&'static str] = _

source§

impl FontDimension

source

pub fn lower(self, char_display_format: CharDisplayFormat) -> Node

Trait Implementations§

source§

impl<'arbitrary> Arbitrary<'arbitrary> for FontDimension

source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
source§

impl Debug for FontDimension

source§

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

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

impl PartialEq<FontDimension> for FontDimension

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for FontDimension

source§

impl StructuralEq for FontDimension

source§

impl StructuralPartialEq for FontDimension

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.