#[repr(u8)]pub enum StandardFont {
Show 14 variants
Courier = 0,
CourierBold = 1,
CourierBoldOblique = 2,
CourierOblique = 3,
Helvetica = 4,
HelveticaBold = 5,
HelveticaBoldOblique = 6,
HelveticaOblique = 7,
Times = 8,
TimesBold = 9,
TimesBoldOblique = 10,
TimesOblique = 11,
Symbol = 12,
Dingbats = 13,
}Expand description
One of the fourteen standard fonts.
The discriminants are load-bearing, not cosmetic. Within a family the order
is Regular, Bold, BoldOblique, Oblique — so index % 4 decides the
style and index + 1 / +2 / +3 is how a style is applied to a family
. Changing the order silently changes substitution.
Variants§
Courier = 0
Courier.
CourierBold = 1
Courier-Bold.
CourierBoldOblique = 2
Courier-BoldOblique.
CourierOblique = 3
Courier-Oblique.
Helvetica = 4
Helvetica.
HelveticaBold = 5
Helvetica-Bold.
HelveticaBoldOblique = 6
Helvetica-BoldOblique.
HelveticaOblique = 7
Helvetica-Oblique.
Times = 8
Times-Roman.
TimesBold = 9
Times-Bold.
TimesBoldOblique = 10
Times-BoldItalic. Note the family asymmetry: Courier and Helvetica
say Oblique where Times says Italic.
TimesOblique = 11
Times-Italic.
Symbol = 12
Symbol.
Dingbats = 13
ZapfDingbats.
Implementations§
Source§impl StandardFont
impl StandardFont
Sourcepub fn from_index(i: usize) -> Option<StandardFont>
pub fn from_index(i: usize) -> Option<StandardFont>
Build from an index, for the arithmetic of the former working note step 10.
Sourcepub fn is_symbolic(self) -> bool
pub fn is_symbolic(self) -> bool
Symbol and ZapfDingbats are the two whose glyphs are not Latin text, which changes both their default flags and their default encoding.
Sourcepub fn is_stylable(self) -> bool
pub fn is_stylable(self) -> bool
Can a style be applied to this index by arithmetic? Only the three
family heads can (IsStylableBaseFont).
Trait Implementations§
Source§impl Clone for StandardFont
impl Clone for StandardFont
Source§fn clone(&self) -> StandardFont
fn clone(&self) -> StandardFont
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more