forked from arnog/mathlive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fonts.less
executable file
·64 lines (59 loc) · 1.63 KB
/
fonts.less
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
@font-folder: './fonts';
@use-woff2: true;
.use-woff2(@family, @family-suffix) when (@use-woff2 = true) {
src+: url('@{font-folder}/KaTeX_@{family}-@{family-suffix}.woff2')
format('woff2');
}
.generate-suffix(@weight, @style)
when
(@weight = normal)
and
(@style = normal) {
@suffix: 'Regular';
}
.generate-suffix(@weight, @style)
when
(@weight = normal)
and
(@style = italic) {
@suffix: 'Italic';
}
.generate-suffix(@weight, @style) when (@weight = bold) and (@style = normal) {
@suffix: 'Bold';
}
.generate-suffix(@weight, @style) when (@weight = bold) and (@style = italic) {
@suffix: 'BoldItalic';
}
.font-face(@family, @weight, @style) {
.generate-suffix(@weight, @style);
@font-face {
font-family: 'KaTeX_@{family}';
.use-woff2(@family, @suffix);
font-weight: @weight;
font-style: @style;
font-display: 'swap';
}
}
.font-face('AMS', normal, normal);
.font-face('Caligraphic', bold, normal);
.font-face('Caligraphic', normal, normal);
.font-face('Fraktur', bold, normal);
.font-face('Fraktur', normal, normal);
.font-face('Main', bold, italic);
.font-face('Main', bold, normal);
.font-face('Main', normal, italic);
.font-face('Main', normal, normal);
.font-face('Math', bold, italic);
.font-face('Math', normal, italic);
.font-face('SansSerif', bold, normal);
.font-face('SansSerif', normal, italic);
.font-face('SansSerif', normal, normal);
.font-face('Script', normal, normal);
.font-face('Size1', normal, normal);
.font-face('Size2', normal, normal);
.font-face('Size3', normal, normal);
.font-face('Size4', normal, normal);
.font-face('Typewriter', normal, normal);
:root {
--ML__static-fonts: true;
}