pub enum StandardFont {
Show 14 variants
Helvetica,
HelveticaBold,
HelveticaOblique,
HelveticaBoldOblique,
Courier,
CourierBold,
CourierOblique,
CourierBoldOblique,
TimesRoman,
TimesBold,
TimesItalic,
TimesBoldItalic,
ZapfDingBats,
Symbol,
}Expand description
The 14 standard fonts of PDF.
Variants§
Helvetica
Helvetica.
HelveticaBold
Helvetica Bold.
HelveticaOblique
Helvetica Oblique.
HelveticaBoldOblique
Helvetica Bold Oblique.
Courier
Courier.
CourierBold
Courier Bold.
CourierOblique
Courier Oblique.
CourierBoldOblique
Courier Bold Oblique.
TimesRoman
Times Roman.
TimesBold
Times Bold.
TimesItalic
Times Italic.
TimesBoldItalic
Times Bold Italic.
ZapfDingBats
Zapf Dingbats - a decorative symbol font.
Symbol
Symbol - a mathematical symbol font.
Implementations§
Source§impl StandardFont
impl StandardFont
Sourcepub fn char_width(&self, ch: char) -> Option<f32>
pub fn char_width(&self, ch: char) -> Option<f32>
Advance width of ch in thousandths of an em, if this face covers it.
The character rides the face’s built-in encoding to a glyph name, and the name reads the standard width table; characters outside Latin-1 have no code there and read as uncovered.
Sourcepub fn postscript_name(&self) -> &'static str
pub fn postscript_name(&self) -> &'static str
Return the postscrit name of the font.
Sourcepub fn get_font_data(&self) -> (FontData, u32)
pub fn get_font_data(&self) -> (FontData, u32)
Return suitable font data for the given standard font.
Currently, this will return the corresponding Foxit font, which is a set of permissibly licensed fonts that is also very light-weight.
You can use the result of this method in your implementation of FontResolverFn.