/
fonts.dei
143 lines (122 loc) · 3.03 KB
/
fonts.dei
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Fonts for the default UI style
#
# - size can be "pt" or "px", defaults to "pt"
# - weight: normal bold light
# - style: normal italic
script {
import Version, gui
# Load the Open Sans font contained in this pack.
def loadOpenSans()
import App, Path
fontDir = Path.fileNamePath(__file__) / "fonts"
# Sadly, light fonts seem to not work in Qt presently.
for style in ['Regular', 'Bold', 'Italic', 'BoldItalic'] #'Light', 'LightItalic'
App.loadFont(fontDir / ("OpenSans-%s.ttf" % style))
end
end
}
group {
condition: Version.OS == 'windows'
script { loadOpenSans() }
font default {
family: Open Sans
size: 12pt
weight: normal
style: normal
}
font monospace inherits default {
family: Courier New
size: 10pt
}
}
group {
condition: Version.OS == 'macx'
script {
# Define mappings for native font styles and weights.
import App
App.addFontMapping("Helvetica Neue", {
['regular', 25]: 'HelveticaNeue-Light',
['regular', 50]: 'HelveticaNeue',
['regular', 75]: 'HelveticaNeue-Bold',
['italic', 25]: 'HelveticaNeue-LightItalic',
['italic', 50]: 'HelveticaNeue-Italic',
['italic', 75]: 'HelveticaNeue-BoldItalic'
})
App.addFontMapping("Menlo", {
['regular', 25]: 'Menlo-Regular',
['regular', 50]: 'Menlo-Regular',
['regular', 75]: 'Menlo-Bold',
['italic', 25]: 'Menlo-Italic',
['italic', 50]: 'Menlo-Italic',
['italic', 75]: 'Menlo-BoldItalic'
})
}
font default {
family: Helvetica Neue
size: 16pt
weight: normal
style: normal
}
font monospace inherits default {
family: Menlo
size: 13pt
}
}
group {
condition: Version.OS == 'unix'
font default {
family: Liberation Sans
size: 13pt
weight: normal
style: normal
}
font monospace inherits default {
family: FreeMono
size: 12pt
}
}
font title inherits default {
size $: gui.scale(__this__.size, 1.75)
weight: light
}
font heading inherits title {
size $: gui.scale(default.size, 1.2)
}
font small inherits default {
size $: gui.scale(__this__.size, 0.75)
}
group editor {
font plaintext inherits default {}
font hint inherits default {
style: italic
weight: light
}
}
group separator {
font empty inherits default {
size $: gui.scale(__this__.size, 0.5)
}
font label inherits small {
weight: bold
}
}
group choice {
font selected inherits default {
weight: bold
}
}
group tab {
font label inherits small {
weight: bold
}
font selected inherits tab.label {}
}
group slider {
font label inherits small {}
font value inherits slider.label {
weight: bold
}
}
group log {
font normal inherits default {}
}