pub struct FontInfo {Show 20 fields
pub name: Vec<u8>,
pub size: i32,
pub design_size: i32,
pub checksum: u32,
pub params: Vec<i32>,
pub chars: HashMap<u32, CharMetrics, FastHash>,
pub hyphen_char: i32,
pub skew_char: i32,
pub kind: FontKind,
pub handle: u64,
pub char_codes: [HashMap<u32, i32>; 4],
pub ignore_ligatures: i32,
pub data: Option<FontData>,
pub lig_kern: LigKernMap,
pub right_boundary: Option<u32>,
pub expansion: Option<FontExpansion>,
pub math_constants: Option<Rc<MathConstants>>,
pub math_chars: Option<Rc<HashMap<u32, MathCharInfo>>>,
pub size_spec: i32,
pub vf: Option<Rc<VirtualFont>>,
}Expand description
A loaded font.
Fields§
§name: Vec<u8>The name as \fontname prints it.
size: i32The size (sp).
design_size: i32The design size (sp).
checksum: u32The TFM checksum (or the checksum of a Lua font table), written
to DVI font definitions.
params: Vec<i32>Font parameters; params[k] is \fontdimen k (index 0 unused).
chars: HashMap<u32, CharMetrics, FastHash>Character metrics.
hyphen_char: i32\hyphenchar.
skew_char: i32\skewchar.
kind: FontKindThe kind of font.
handle: u64Opaque handle for the loader/backend (e.g. index of the parsed OpenType font and its feature set).
char_codes: [HashMap<u32, i32>; 4]Per-character \lpcode, \rpcode, \efcode, \tagcode.
ignore_ligatures: i32\ignoreligaturesinfont and other per-font integers.
data: Option<FontData>Host data (shaping, embedding).
lig_kern: LigKernMapLig/kern programs by left character; only the first step for each
right character is kept. LEFT_BOUNDARY holds the left boundary
program.
right_boundary: Option<u32>The right boundary character (TFM’s bchar), if any.
expansion: Option<FontExpansion>Font expansion parameters (\expandglyphsinfont), if expandable.
math_constants: Option<Rc<MathConstants>>The OpenType MathConstants (in scaled points, or percent), for
fonts loaded with a MATH table; they set the \Umath… parameters
when the font is assigned to a math family.
math_chars: Option<Rc<HashMap<u32, MathCharInfo>>>Per-character OpenType math data (variants, extensible parts, top accent attachments), for math fonts.
size_spec: i32The size requested by \font (positive at size, or minus the
scaled factor); i32::MIN if not loaded by \font.
vf: Option<Rc<VirtualFont>>How to draw the characters, for a TFM font that has a virtual
font (.vf) of the same name, or a font from Lua whose characters
have commands.