Skip to main content

unicode_font_character

Function unicode_font_character 

Source
pub fn unicode_font_character(font: &str, ch: &str) -> Option<String>
Expand description

Returns the Unicode mathematical alphanumeric character for a given font style and ASCII letter/digit, or None when no mapping exists.

Font styles that match LaTeX commands:

  • mathbf / boldsymbol — Bold / Bold Italic
  • mathit — Italic
  • mathbb — Double-struck (blackboard bold)
  • mathcal — Calligraphic / Script
  • mathfrak — Fraktur
  • mathscr — Script (rsfs)
  • mathsf — Sans-serif
  • mathtt — Monospace
  • mathsfit — Sans-serif Italic
  • mathrm / mathnormal — Roman (identity, not handled here) / Italic