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
/// Transform a character to it's mathematical fraktur equivalent.
pub fn math_fraktur(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,
    }
}