pub enum FontVariant {
Bold,
BoldItalic,
BoldSansSerif,
DoubleStruck,
Fraktur,
Italic,
Monospace,
Normal,
SansSerif,
SansSerifBoldItalic,
SansSerifItalic,
Script,
}
Expand description
Enumeration of font variants used in mathematical expression rendering.
This enum defines the various font styles available for rendering math symbols and text in KaTeX. Each variant corresponds to a specific typeface or style that can be applied to mathematical content for proper typographical presentation.
§LaTeX/KaTeX Context
LaTeX provides extensive font support for mathematical typesetting, including special symbol fonts (e.g., Blackboard Bold for sets, Fraktur for certain notations). KaTeX implements these variants to ensure accurate reproduction of mathematical documents with correct symbol rendering.
§Cross-references
- See
CssStyle
for CSS-based font styling. - Related to
StyleVariant
for size and positioning adjustments. - Used in symbol lookup and font metric calculations.
Variants§
Bold
Bold font variant for emphasized mathematical symbols.
BoldItalic
Bold italic font variant for bold mathematical variables.
BoldSansSerif
Bold sans-serif font variant for UI elements in math.
DoubleStruck
Double-struck (Blackboard Bold) font variant for sets (e.g., ℝ, ℕ).
Fraktur
Fraktur font variant for special mathematical notation.
Italic
Italic font variant for mathematical variables and functions.
Monospace
Monospace font variant for code and typewriter text in math.
Normal
Normal (roman) font variant for regular mathematical text.
SansSerif
Sans-serif font variant for clean, modern mathematical text.
SansSerifBoldItalic
Sans-serif bold italic font variant for emphasized sans-serif text.
SansSerifItalic
Sans-serif italic font variant for italic sans-serif text.
Script
Script font variant for calligraphic mathematical symbols.
Trait Implementations§
Source§impl Clone for FontVariant
impl Clone for FontVariant
Source§fn clone(&self) -> FontVariant
fn clone(&self) -> FontVariant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more