Skip to content

Commit c47903f

Browse files
committed
Add optional woff2 versions of FiraSans.
For browsers that support woff2 (most modern ones: https://caniuse.com/woff2), this offers a reduction in download size for these two fonts from 362k to 257k (32% reduction). It decreases the total page size for `struct.String.html` (counting all subresources) by about 2.5%. If this is interesting, I'm happy to apply the same treatment to the other fonts, but these two are the biggest.
1 parent 9b471a3 commit c47903f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed
Binary file not shown.
Binary file not shown.

src/librustdoc/html/static/rustdoc.css

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
font-family: 'Fira Sans';
44
font-style: normal;
55
font-weight: 400;
6-
src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
6+
src: local('Fira Sans'),
7+
url("FiraSans-Regular.woff2") format("woff2"),
8+
url("FiraSans-Regular.woff") format('woff');
79
}
810
@font-face {
911
font-family: 'Fira Sans';
1012
font-style: normal;
1113
font-weight: 500;
12-
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
14+
src: local('Fira Sans Medium'),
15+
url("FiraSans-Medium.woff2") format("woff2"),
16+
url("FiraSans-Medium.woff") format('woff');
1317
}
1418

1519
/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */

0 commit comments

Comments
 (0)