pub struct File {
pub header: Header,
pub design_units: Number,
pub char_dimens: BTreeMap<Char, CharDimensions>,
pub char_tags: BTreeMap<Char, CharTag>,
pub unset_char_tags: BTreeMap<Char, u8>,
pub lig_kern_program: Program,
pub params: Vec<Number>,
pub additional_widths: Vec<Number>,
pub additional_heights: Vec<Number>,
pub additional_depths: Vec<Number>,
pub additional_italics: Vec<Number>,
}
Expand description
Complete contents of a property list (.pl) file.
Fields§
§header: Header
§design_units: Number
§char_dimens: BTreeMap<Char, CharDimensions>
Tags that have been unset, but whose discriminant is still written to a .tfm file by PLtoTF.
lig_kern_program: Program
§params: Vec<Number>
§additional_widths: Vec<Number>
Additional widths that appear in the plst file but not appear in the fully parsed file.
This can happen due to the following plst listing:
(CHARACTER C X (CHARWD D 8.0))
(CHARACTER C X (CHARWD D 9.0))
In this case the width 8.0
is not in the fully parsed file because it is overwritten
by 9.0
.
However pltotf still writes the 8.0
width to the .tfm file.
additional_heights: Vec<Number>
Additional heights; similar to additional widths.
additional_depths: Vec<Number>
Additional depths; similar to additional widths.
additional_italics: Vec<Number>
Additional italic corrections; similar to additional widths.
Implementations§
source§impl File
impl File
sourcepub fn from_pl_source_code(source: &str) -> (File, Vec<ParseWarning>)
pub fn from_pl_source_code(source: &str) -> (File, Vec<ParseWarning>)
Build a File from PL source code.
sourcepub fn lig_kern_entrypoints(&self, include_orphans: bool) -> HashMap<Char, u16>
pub fn lig_kern_entrypoints(&self, include_orphans: bool) -> HashMap<Char, u16>
Return a map from characters to the lig/kern entrypoint for that character.
sourcepub fn clear_lig_kern_data(&mut self)
pub fn clear_lig_kern_data(&mut self)
Clear all lig/kern data from the file.
source§impl File
impl File
sourcepub fn lower(&self, char_display_format: CharDisplayFormat) -> Ast
pub fn lower(&self, char_display_format: CharDisplayFormat) -> Ast
Lower a File to an AST.
sourcepub fn display(
&self,
indent: usize,
char_display_format: CharDisplayFormat
) -> Display<'_>
pub fn display( &self, indent: usize, char_display_format: CharDisplayFormat ) -> Display<'_>
Display this file.
This function returns a helper type that implements the std::fmt::Display
trait and can be used in print!
and similar macros.