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
/// Transform a character to it's mathematical sans-serif italic
/// equivalent.
pub fn math_sans_serif_italic(c: char) -> Option<char> {
    match c {
        // 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,
    }
}