Enum tfm::pl::ast::Root

source ·
pub enum Root {
Show 13 variants Checksum(SingleValue<u32>), DesignSize(SingleValue<DesignSize>), DesignUnits(SingleValue<Number>), CodingScheme(SingleValue<String>), Family(SingleValue<String>), Face(SingleValue<Face>), SevenBitSafeFlag(SingleValue<bool>), Header(TupleValue<DecimalU8, u32>), FontDimension(Branch<(), FontDimension>), LigTable(Branch<(), LigTable>), BoundaryChar(SingleValue<Char>), Character(Branch<Char, Character>), Comment(String),
}
Expand description

A root node in a property list file.

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

Variants§

§

Checksum(SingleValue<u32>)

The checksum value is used to identify a particular version of a font; it should match the check sum value stored with the font itself. An explicit check sum of zero is used to bypass check sum testing. If no checksum is specified in the PL file, PLtoTF will compute the checksum that METAFONT would compute from the same data

§

DesignSize(SingleValue<DesignSize>)

The design size, which should be in the range, [1.0, 2048), represents the default amount by which all quantities will be scaled if the font is not loaded with an at specification. For example, if one says \font\A=cmr10 at 15pt in TeX language, the design size in the TFM file is ignored and effectively replaced by 15 points; but if one simply says \font\A=cmr10 the stated design size is used. This quantity is always in units of printer’s points.

§

DesignUnits(SingleValue<Number>)

The design units specifies how many units equals the design size (or the eventual ‘at’ size, if the font is being scaled). For example, suppose you have a font that has been digitized with 600 pixels per em, and the design size is one em; then you could say (DESIGNUNITS R 600) if you wanted to give all of your measurements in units of pixels.

§

CodingScheme(SingleValue<String>)

A string that identifies the correspondence between the numeric codes and font characters. Its length must be less than 40. (TeX ignores this information, but other software programs make use of it.)

§

Family(SingleValue<String>)

A string that identifies the name of the family to which this font belongs, e.g., ‘HELVETICA’. Its length must be less than 20. (TeX ignores this information; but it is needed, for example, when converting DVI files to PRESS files for Xerox equipment.)

§

Face(SingleValue<Face>)

This value is a subsidiary identification of the font within its family. For example, bold italic condensed fonts might have the same family name as light roman extended fonts, differing only in their face byte. (TeX ignores this information; but it is needed, for example, when converting DVI files to PRESS files for Xerox equipment.)

§

SevenBitSafeFlag(SingleValue<bool>)

If true, character codes less than 128 cannot lead to codes of 128 or more via ligatures or char lists or extensible characters. (TeX82 ignores this flag, but older versions of TeX would only accept TFM files that were seven-bit safe.) PLtoTF computes the correct value of this flag and gives an error message only if a claimed “true” value is incorrect.

§

Header(TupleValue<DecimalU8, u32>)

Value of a header. The one-byte value should be at least 18. The four-byte value goes into the header word whose index is the one-byte value; for example, to set header[18]=1, one may write (HEADER D 18 O 1). This notation is used for header information that is presently unnamed. (TeX ignores it.)

§

FontDimension(Branch<(), FontDimension>)

Font dimensions property list.

§

LigTable(Branch<(), LigTable>)

A lig table.

§

BoundaryChar(SingleValue<Char>)

If the boundary character appears in a lig table command (LIGTABLE), it matches “end of word” as well as itself. If no boundary character is given and no LABEL BOUNDARYCHAR occurs within a lig table, word boundaries will not affect ligatures or kerning.

§

Character(Branch<Char, Character>)

Metrics for a character in the font. The value specifies the character and the property list of Character nodes specifies metrics for the character.

§

Comment(String)

A comment that is ignored.

Implementations§

source§

impl Root

source

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

source

pub const DESIGN_SIZE: &'static str = "DESIGNSIZE"

source

pub const DESIGN_UNITS: &'static str = "DESIGNUNITS"

source

pub const CODING_SCHEME: &'static str = "CODINGSCHEME"

source

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

source

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

source

pub const SEVEN_BIT_SAFE_FLAG: &'static str = "SEVENBITSAFEFLAG"

source

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

source

pub const FONT_DIMENSION: &'static str = "FONTDIMEN"

source

pub const LIG_TABLE: &'static str = "LIGTABLE"

source

pub const BOUNDARY_CHAR: &'static str = "BOUNDARYCHAR"

source

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

source

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

source§

impl Root

source

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

Trait Implementations§

source§

impl<'arbitrary> Arbitrary<'arbitrary> for Root

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 Root

source§

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

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

impl PartialEq<Root> for Root

source§

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

source§

impl StructuralEq for Root

source§

impl StructuralPartialEq for Root

Auto Trait Implementations§

§

impl RefUnwindSafe for Root

§

impl Send for Root

§

impl Sync for Root

§

impl Unpin for Root

§

impl UnwindSafe for Root

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.