Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove typekit fonts #3982
Ugh, yes i've wanted this gone for a long time now.
Any reason not to just use Lato and match the theme font for sans serif faces? I'd prefer that over using the GitHub font faces. We should also probably include our fonts via CSS while we drop typekit
@agjohnson, we are discussing dropping Lato on the theme as well. Currently, it is ~1.5MB to download Lato on the theme (#3564). That would be reduced by only around half if we correctly gzipped them or served woff's. That's a lot of performance penalty for a font.
In general I'm +1 on a native font stack vs having a flash of unstyled text and longer load times but I don't feel that strongly.
I'd be -1 on dropping Lato from our theme. It was originally used because it provided a better default experience for a wider range of non-CJK character sets. Its also an attractive type, which is baked into our theme experience -- i wouldn't want to leave display up to the OS here. I don't have a good solution for reducing load time here besides gzip compression though.
At very least, combining the asset source for docs and dashboard makes sense.
While I believe that native OS fonts have gotten much better in the last few years with both Apple and Microsoft releasing high quality fonts for their platforms recently with great character support, I'm fine sticking with Lato and I'll rework this PR to use it. It is important to stay on brand. I'll see what can be done from the performance side. Most likely that will mean including the woff files in addition to the ttf.
I don't think I'm going to worry about this specifically in this PR as that will likely involve theme changes.
I added Lato. Without subsetting the fonts (removing glyphs we don't need) the total for the regular, italic and bold versions of Lato are a little more than 1MB. Woff files are already compressed and so this can't be improved by gzipping.
Woff files are sufficiently supported I believe where we don't even need to deliver the TTFs at all: https://caniuse.com/#search=woff
Apr 26, 2018
1 check passed
This is probably a good change on sphinx_rtd_theme. We can get the improvements in performance without the nginx config changes around font gzipping.
Shipping woff only will mean formally dropping full support for IE8 and before (IE8 users would see a fallback font). There is some discussion of a formal browser support policy in rtfd/sphinx_rtd_theme#525.