-
Notifications
You must be signed in to change notification settings - Fork 14
/
csfonts.go
69 lines (67 loc) · 1.89 KB
/
csfonts.go
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
package main
func (c *Config) Default() {
var csfont = []string{
"Courier New",
"Stratum2 Black Condensed",
"Stratum2 Black Italic",
"Stratum2 Black TF",
"Stratum2 Black",
"Stratum2 Bold Condensed",
"Stratum2 Bold Monodigit",
"Stratum2 Bold TF",
"Stratum2 Condensed",
"Stratum2 Light Condensed",
"Stratum2 Light Italic",
"Stratum2 Light TF",
"Stratum2 Light",
"Stratum2 Medium Condensed",
"Stratum2 Medium Italic",
"Stratum2 Medium TF",
"Stratum2 Medium",
"Stratum2 Mono Light",
"Stratum2 Mono",
"Stratum2 Regular Monodigit",
"Stratum2 TF",
"Stratum2 Thin Condensed",
"Stratum2 Thin TF",
"Stratum2",
"Times New Roman",
"noto",
"notomono-regular",
"notosans",
"notoserif",
}
if len(c.Fonts) == 0 {
for _, defFont := range csfont {
c.Fonts = append(c.Fonts, FontStruct{
ValveFont: defFont,
ReplaceFont: c.Font,
Pixelsize: c.Pixelsize,
Weight: c.Weight,
EmbeddedBitmap: c.EmbeddedBitmap,
PreferOutline: c.PreferOutline,
DoSubstitutions: c.DoSubstitutions,
BitmapMonospace: c.BitmapMonospace,
ForceAutohint: c.ForceAutohint,
Dpi: c.Dpi,
QtUseSubpixelPositioning: c.QtUseSubpixelPositioning,
})
}
} else {
for i := 0; i < len(c.Fonts); i++ {
c.Fonts[i] = FontStruct{
ValveFont: c.Fonts[i].ValveFont,
ReplaceFont: c.Font,
Pixelsize: c.Pixelsize,
Weight: c.Weight,
EmbeddedBitmap: c.EmbeddedBitmap,
PreferOutline: c.PreferOutline,
DoSubstitutions: c.DoSubstitutions,
BitmapMonospace: c.BitmapMonospace,
ForceAutohint: c.ForceAutohint,
Dpi: c.Dpi,
QtUseSubpixelPositioning: c.QtUseSubpixelPositioning,
}
}
}
}