69330
|
1 |
/* Title: Pure/Tools/isabelle_fonts.scala
|
|
2 |
Author: Makarius
|
|
3 |
|
|
4 |
Construction of Isabelle fonts.
|
|
5 |
*/
|
|
6 |
|
|
7 |
package isabelle
|
|
8 |
|
|
9 |
|
|
10 |
object Isabelle_Fonts
|
|
11 |
{
|
|
12 |
/* relevant codepoint ranges */
|
|
13 |
|
|
14 |
object Range
|
|
15 |
{
|
|
16 |
def plain_text: Seq[Int] =
|
|
17 |
(0x0020 to 0x007e) ++ // ASCII
|
|
18 |
(0x00a0 to 0x024f) ++ // Latin Extended-A/B
|
|
19 |
(0x0400 to 0x04ff) ++ // Cyrillic
|
|
20 |
(0x0590 to 0x05ff) ++ // Hebrew (non-mono)
|
|
21 |
(0x0600 to 0x06ff) ++ // Arabic
|
|
22 |
Seq(
|
|
23 |
0x2018, // single quote
|
|
24 |
0x2019, // single quote
|
|
25 |
0x201a, // single quote
|
|
26 |
0x201c, // double quote
|
|
27 |
0x201d, // double quote
|
|
28 |
0x201e, // double quote
|
|
29 |
0x2039, // single guillemet
|
|
30 |
0x203a, // single guillemet
|
69331
|
31 |
0x204b, // FOOTNOTE
|
69330
|
32 |
0x20ac, // Euro
|
|
33 |
0xfb01, // ligature fi
|
|
34 |
0xfb02, // ligature fl
|
|
35 |
0xfffd, // replacement character
|
|
36 |
)
|
|
37 |
|
|
38 |
def symbols: Seq[Int] =
|
|
39 |
Seq(
|
|
40 |
0x05, // X
|
|
41 |
0x06, // Y
|
|
42 |
0x07, // EOF
|
|
43 |
0x7f, // DEL
|
|
44 |
0xac, // logicalnot
|
|
45 |
0xb0, // degree
|
|
46 |
0xb1, // plusminus
|
|
47 |
0xb7, // periodcentered
|
|
48 |
0xd7, // multiply
|
|
49 |
0xf7, // divide
|
|
50 |
) ++
|
|
51 |
(0x0370 to 0x03ff) ++ // Greek (pseudo math)
|
|
52 |
Seq(
|
|
53 |
0x2010, // hyphen
|
|
54 |
0x2013, // dash
|
|
55 |
0x2014, // dash
|
|
56 |
0x2015, // dash
|
|
57 |
0x2020, // dagger
|
|
58 |
0x2021, // double dagger
|
|
59 |
0x2022, // bullet
|
|
60 |
0x2026, // ellipsis
|
|
61 |
0x2030, // perthousand
|
|
62 |
0x2032, // minute
|
|
63 |
0x2033, // second
|
|
64 |
0x2038, // caret
|
|
65 |
0x20cd, // currency symbol
|
|
66 |
) ++
|
|
67 |
(0x2100 to 0x214f) ++ // Letterlike Symbols
|
|
68 |
(0x2190 to 0x21ff) ++ // Arrows
|
|
69 |
(0x2200 to 0x22ff) ++ // Mathematical Operators
|
|
70 |
(0x2300 to 0x23ff) ++ // Miscellaneous Technical
|
|
71 |
Seq(
|
|
72 |
0x2423, // graphic for space
|
|
73 |
0x2500, // box drawing
|
|
74 |
0x2501, // box drawing
|
|
75 |
0x2508, // box drawing
|
|
76 |
0x2509, // box drawing
|
|
77 |
0x2550, // box drawing
|
|
78 |
) ++
|
|
79 |
(0x25a0 to 0x25ff) ++ // Geometric Shapes
|
|
80 |
Seq(
|
69331
|
81 |
0x261b, // ACTION
|
69330
|
82 |
0x2660, // spade suit
|
|
83 |
0x2661, // heart suit
|
|
84 |
0x2662, // diamond suit
|
|
85 |
0x2663, // club suit
|
|
86 |
0x266d, // musical flat
|
|
87 |
0x266e, // musical natural
|
|
88 |
0x266f, // musical sharp
|
|
89 |
0x2756, // UNDEFINED
|
|
90 |
0x2759, // BOLD
|
|
91 |
0x27a7, // DESCR
|
|
92 |
0x27e6, // left white square bracket
|
|
93 |
0x27e7, // right white square bracket
|
|
94 |
0x27e8, // left angle bracket
|
|
95 |
0x27e9, // right angle bracket
|
|
96 |
) ++
|
|
97 |
(0x27f0 to 0x27ff) ++ // Supplemental Arrows-A
|
|
98 |
(0x2900 to 0x297f) ++ // Supplemental Arrows-B
|
|
99 |
(0x2980 to 0x29ff) ++ // Miscellaneous Mathematical Symbols-B
|
|
100 |
(0x2a00 to 0x2aff) ++ // Supplemental Mathematical Operators
|
|
101 |
Seq(0x2b1a) ++ // VERBATIM
|
|
102 |
(0x1d400 to 0x1d7ff) ++ // Mathematical Alphanumeric Symbols
|
|
103 |
Seq(
|
69331
|
104 |
0x1f310, // globe with meridians (Symbola font)
|
|
105 |
0x1f4d3, // notebook (Symbola font)
|
|
106 |
0x1f5c0, // folder (Symbola font)
|
|
107 |
0x1f5cf, // page (Symbola font)
|
69330
|
108 |
)
|
|
109 |
}
|
|
110 |
|
|
111 |
|
|
112 |
/* font families */
|
|
113 |
|
69332
|
114 |
sealed case class Family(
|
|
115 |
plain: String = "",
|
|
116 |
bold: String = "",
|
|
117 |
italic: String = "",
|
|
118 |
bold_italic: String = "",
|
|
119 |
fallback: Option[Family] = None)
|
69330
|
120 |
|
|
121 |
object Family
|
|
122 |
{
|
69332
|
123 |
def deja_vu_sans_mono: Family =
|
69330
|
124 |
Family(
|
69332
|
125 |
plain = "DejaVuSansMono.ttf",
|
|
126 |
bold = "DejaVuSansMono-Bold.ttf",
|
|
127 |
italic = "DejaVuSansMono-Oblique.ttf",
|
|
128 |
bold_italic = "DejaVuSansMono-BoldOblique.ttf",
|
|
129 |
fallback = Some(deja_vu_sans))
|
69330
|
130 |
|
69332
|
131 |
def deja_vu_sans: Family =
|
69330
|
132 |
Family(
|
69332
|
133 |
plain = "DejaVuSans.ttf",
|
|
134 |
bold = "DejaVuSans-Bold.ttf",
|
|
135 |
italic = "DejaVuSans-Oblique.ttf",
|
|
136 |
bold_italic = "DejaVuSans-BoldOblique.ttf")
|
69330
|
137 |
|
69332
|
138 |
def deja_vu_serif: Family =
|
69330
|
139 |
Family(
|
69332
|
140 |
plain = "DejaVuSerif.ttf",
|
|
141 |
bold = "DejaVuSerif-Bold.ttf",
|
|
142 |
italic = "DejaVuSerif-Italic.ttf",
|
|
143 |
bold_italic = "DejaVuSerif-BoldItalic.ttf")
|
69330
|
144 |
}
|
|
145 |
}
|