Skip to main content

Module font

Module font 

Source

Modules§

standard_metrics

Structs§

Font
A data structure containing Font information, but also related textual properties (such as color)

Constants§

FLAG_EMPH
FLAG_FORCE_FAMILY
FLAG_FORCE_SERIES
FLAG_FORCE_SHAPE
MATH_FONTS
TEXT_FONTS

Statics§

FONT_TEXT_DEFAULT

Functions§

decode
decode_fontname
decode_str
Decode a codepoint, returning a SymStr that may contain multiple characters. This handles Perl font map entries like UTF(0xA0)."\x{0335}" (OT1 pos 32).
decode_string
font_match_xpaths
Generate XPath fragments for font matching. Perl: font_match_xpaths
get_metric_for_name
Find a Font Metric for a given fontname, fallback to 10pt or cmr as needed. Perl: getMetricForName
lookup_font_family
Global auxiliary for font family lookup
lookup_font_series
Global auxiliary for font series lookup
lookup_font_shape
Global auxiliary for font shape lookup
lookup_tex_font
Combine family/series/shape lookups into a single Font (Perl lookupTeXFont)
match_font
Matches fonts when both are converted to toString strings. Uses regex caching for repeated lookups. Perl: match_font
rationalize_font_size
Convert stanard font size names, such as tiny, Huge, etc to f64
relative_font_size
convert size to percent

Type Aliases§

Fontmap