|
3 | 3 | font-family: 'Fira Sans'; |
4 | 4 | font-style: normal; |
5 | 5 | font-weight: 400; |
| 6 | + font-display: optional; |
6 | 7 | src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff'); |
7 | 8 | } |
8 | 9 | @font-face { |
9 | 10 | font-family: 'Fira Sans'; |
10 | 11 | font-style: normal; |
11 | 12 | font-weight: 500; |
| 13 | + font-display: optional; |
12 | 14 | src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff'); |
13 | 15 | } |
14 | 16 |
|
|
17 | 19 | font-family: 'Source Serif Pro'; |
18 | 20 | font-style: normal; |
19 | 21 | font-weight: 400; |
| 22 | + /* The difference for body text without this font is greater than other fonts, |
| 23 | + * so the 0~100ms block of fallback is preferred over optional, for legibility. */ |
| 24 | + font-display: fallback; |
20 | 25 | src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff'); |
21 | 26 | } |
22 | 27 | @font-face { |
23 | 28 | font-family: 'Source Serif Pro'; |
24 | 29 | font-style: italic; |
25 | 30 | font-weight: 400; |
| 31 | + font-display: optional; |
26 | 32 | src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff'); |
27 | 33 | } |
28 | 34 | @font-face { |
29 | 35 | font-family: 'Source Serif Pro'; |
30 | 36 | font-style: normal; |
31 | 37 | font-weight: 700; |
| 38 | + font-display: optional; |
32 | 39 | src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff'); |
33 | 40 | } |
34 | 41 |
|
|
37 | 44 | font-family: 'Source Code Pro'; |
38 | 45 | font-style: normal; |
39 | 46 | font-weight: 400; |
| 47 | + font-display: optional; |
40 | 48 | /* Avoid using locally installed font because bad versions are in circulation: |
41 | 49 | * see https://github.com/rust-lang/rust/issues/24355 */ |
42 | 50 | src: url("SourceCodePro-Regular.woff") format('woff'); |
|
45 | 53 | font-family: 'Source Code Pro'; |
46 | 54 | font-style: normal; |
47 | 55 | font-weight: 600; |
| 56 | + font-display: optional; |
48 | 57 | src: url("SourceCodePro-Semibold.woff") format('woff'); |
49 | 58 | } |
50 | 59 |
|
|
0 commit comments