1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/// Transform a character to it's mathematical sans-serif equivalent.
pub fn math_sans_serif(c: char) -> Option<char> {
    match c {
        // Digits
        '0' => Some('𝟎'),
        '1' => Some('𝟏'),
        '2' => Some('𝟐'),
        '3' => Some('𝟑'),
        '4' => Some('𝟒'),
        '5' => Some('𝟓'),
        '6' => Some('𝟔'),
        '7' => Some('𝟕'),
        '8' => Some('𝟖'),
        '9' => Some('𝟗'),

        // Latin capital letters.
        'A' => Some('𝖠'),
        'B' => Some('𝖡'),
        'C' => Some('𝖢'),
        'D' => Some('𝖣'),
        'E' => Some('𝖤'),
        'F' => Some('𝖥'),
        'G' => Some('𝖦'),
        'H' => Some('𝖧'),
        'I' => Some('𝖨'),
        'J' => Some('𝖩'),
        'K' => Some('𝖪'),
        'L' => Some('𝖫'),
        'M' => Some('𝖬'),
        'N' => Some('𝖭'),
        'O' => Some('𝖮'),
        'P' => Some('𝖯'),
        'Q' => Some('𝖰'),
        'R' => Some('𝖱'),
        'S' => Some('𝖲'),
        'T' => Some('𝖳'),
        'U' => Some('𝖴'),
        'V' => Some('𝖵'),
        'W' => Some('𝖶'),
        'X' => Some('𝖷'),
        'Y' => Some('𝖸'),
        'Z' => Some('𝖹'),

        // Latin small letters.
        'a' => Some('𝖺'),
        'b' => Some('𝖻'),
        'c' => Some('𝖼'),
        'd' => Some('𝖽'),
        'e' => Some('𝖾'),
        'f' => Some('𝖿'),
        'g' => Some('𝗀'),
        'h' => Some('𝗁'),
        'i' => Some('𝗂'),
        'j' => Some('𝗃'),
        'k' => Some('𝗄'),
        'l' => Some('𝗅'),
        'm' => Some('𝗆'),
        'n' => Some('𝗇'),
        'o' => Some('𝗈'),
        'p' => Some('𝗉'),
        'q' => Some('𝗊'),
        'r' => Some('𝗋'),
        's' => Some('𝗌'),
        't' => Some('𝗍'),
        'u' => Some('𝗎'),
        'v' => Some('𝗏'),
        'w' => Some('𝗐'),
        'x' => Some('𝗑'),
        'y' => Some('𝗒'),
        'z' => Some('𝗓'),

        // No equivalence.
        _ => None,
    }
}