As discussed in #1095, Typekit represents a huge amount of the total page weight of Rubygems.org. This PR aims to change that, while minimizing impact on the visual look and feel of the site.
This PR:
- CSS for a mobile then converting to tablet, desktop, and a larger desktop. Ask Question. Up vote 0 down vote favorite.
- You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Buy Grotesque Bold desktop font from Wooden Type Foundry on Fonts.com. CSS Name: Available Web Font Formats. The Monotype Brand Family.
- Removes Typekit
- Swaps Aktiv Grotesk, the current site font, with a single 'accent' h1 header font (Raleway) and uses system fonts for all remaining text.
Philosophy
I think open source should be accessible to everyone - whether you have a snappy high bandwidth connection or not. Ruby is a global phenomenon, and I want to encourage even more people to try Ruby by making sure that our infrastructure performs well for people with average global connection speeds.
Changes
Aktiv Grotesk was previously used for all site text. Excluding h1s, I have changed this to Helvetica Neue (Arial on non-Mac platforms). Here is a side-by-side of Aktiv Grotesk vs Helvetica, Aktiv on top:
The most visually distinctive typographic feature of the current design is the use of a light-weight font for h1s. I have retained that by swapping in Raleway, a similar humanist sans-serif. Here is a side-by-side of Aktiv Grotesk vs Raleway, Aktiv on top:
Here's a comparison of a Gem page.
Benefits
Taking this approach shaves almost 400KB off the total page weight (almost 70%). That sounds nice, but what is really compelling is its impact on first-time page loads and paint times.
For this test, I used Google Chrome's network throttling feature. The site was running in production mode. I assumed a 625KB/s (5mbps) connection for the average global user (this number is pulled from Akamai), and a 1.5 MB/s (12mbps) connection for the average US user (also Akamai).
Current Live Site
Time to First Paint | Time to Paint Text (fonts loaded) | Time to Full Load | |
---|---|---|---|
US | 3.56s | 3.83s | 3.96s |
Worldwide | 7.41s | 7.59s | 8.20s |
This Pull Request
Time to First Paint | Time to Paint Text (fonts loaded) | Time to Full Load | |
---|---|---|---|
US | 854ms | 1.16s | 1.78s |
Worldwide | 1.60s | 2.42s | 3.96s |
It's worth noting that, because there is no longer any render-blocking javascript before the CSS in the HEAD tag, the impact on paint times is far greater, percentage wise, than the impact on total
load
event times.These numbers may be even better in production, as my local setup is slightly gimped versus the live site because I'm not serving the site assets gzipped.
The average worldwide connection sees nearly a 75% improvement in time to painting all the text to the screen with this change. Time to paint is more important than time to load in this case - load times are slightly behind the entire page actually being rendered.
Open Questions
- Can we get a designer to review this change from a visual standpoint?
- Also a design question - should we consider adding Segoe UI or Calibri to the font stack for Windows users? Those fonts offer considerably more weights than Arial, but look slightly different. EDIT: No, let's leave that for another day.
- I used Google Fonts because Google will intelligently serve the best font format to each User Agent (WOFF2 to Chrome/FF, WOFF to IE9 >, I think TrueType for all else). We could inline a WOFF version into the CSS instead, which would allow us to eliminate Google entirely. There may be a small performance benefit to this. EDIT: Also leave for another day.
Total Downloads 88870
Style : Medium Italic
TAG's : Aktiv--Grotesk--Medium--Italic
Size : 158.42 KB
Update : November 21, 2017, 3:32 am
Copyright
Trademark
#1 Add to the head section of web page. <link href='//db.onlinewebfonts.com/c/52d548fbcf4d58a05c478134b19c72c4?family=Aktiv+Grotesk' type='text/css'/> #2 Using @import CSS directive, put the following line in add to your css file.(http | https)@import url(//db.onlinewebfonts.com/c/52d548fbcf4d58a05c478134b19c72c4?family=Aktiv+Grotesk);#3 Use font-face declaration Fonts.(http | https) @font-face {font-family: 'Aktiv Grotesk'; src: url('//db.onlinewebfonts.com/t/52d548fbcf4d58a05c478134b19c72c4.eot'); src: url('//db.onlinewebfonts.com/t/52d548fbcf4d58a05c478134b19c72c4.eot?#iefix') format('embedded-opentype'), url('//db.onlinewebfonts.com/t/52d548fbcf4d58a05c478134b19c72c4.woff2') format('woff2'), url('//db.onlinewebfonts.com/t/52d548fbcf4d58a05c478134b19c72c4.woff') format('woff'), url('//db.onlinewebfonts.com/t/52d548fbcf4d58a05c478134b19c72c4.ttf') format('truetype'), url('//db.onlinewebfonts.com/t/52d548fbcf4d58a05c478134b19c72c4.svg#Aktiv Grotesk') format('svg'); }
Copyright 2013 Dalton Maag Ltd. All rights reserved. This font may not be altered in any way without prior permission of Dalton Maag Ltd.
Aktiv Grotesk, Dalton Maag, and DaMa are registered trademarks of Dalton Maag Ltd.
Download Format
Aktiv Grotesk Font
Aktiv Grotesk Medium
demo
More DownloadAktiv Grotesk W04 HairlineAktiv Grotesk W04 Hairline ItAktiv Grotesk W04 ThinAktiv Grotesk W04 Thin ItalicAktiv Grotesk W06 LightAktiv Grotesk W06 Light ItalicAktiv Grotesk W06 RegularAktiv Grotesk W06 ItalicAktiv Grotesk W06 MediumAktiv Grotesk W06 Medium ItalicAktiv Grotesk W06 BoldAktiv Grotesk W06 Bold ItalicAktiv Grotesk W04 XBoldAktiv Grotesk W04 XBold ItalicAktiv Grotesk W04 BlackAktiv Grotesk W04 Black Italic
Aktiv Grotesk Font ScreenshotsCalifornia Grotesk Font
Aktiv Grotesk Font Comments
Aktiv Grotesk Font
- Chennai W00 Black
- Xenik
- Torcao W01 Exp Bk It
- Syntax Lapidar Srf DS LT W01 Hv
- Coral W00 Black
- Chennai W00 Oblique
- MidlandRailNF V2
- Castor One W01 Italic
- F2F TyrellCorp LT W00