-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure all families have regular:400 styles #20
Comments
As this reproduces with Google Fonts without the webfont loader I'd say this is the right place. Thank you for the report. |
The Google Fonts API doesn't support the FVD syntax in any way, but it has a default response. If you look at the contents of http://fonts.googleapis.com/css?family=Open+Sans:i5 then you see only the i4 is returned; anything without an
They don't have regular:400 styles, and they ought to :) When a family only supports non 400 weights, the weight needs to be specified. |
My personal opinion is that any secondary CSS API syntax is unlikely to be supported, because it would mean reducing the maximal caching that comes with a single primary syntax. However, I'm personally curious to better understand your motivation for using the FVD syntax. Why is this syntax better? :) |
Unless I'm missing something, I don't think this would alter caching? Google responds with a css file that contains a @font-face definition which, in turn, contains src url's to the font. Calling https://fonts.googleapis.com/css?family=Buda:n3 shouldn't change what's declared in the CSS that I know of (but I really don't know how that random string used for the font src is generated) FVD is just a nice format that I thought TypeKit and Google worked on together? It's supposed to be "A way to unambiguously, compactly and clearly describe a set of @font-face properties." But above all that, it's less characters and I'm a lazy typist. :-) |
WRT caching, if you visit site 1 that uses |
I can recommend tools like https://github.com/tekezo/Karabiner (mac) and https://github.com/AutoHotkey/AutoHotkey (windows) for helping with that :) |
Again, I don't think you're taking a caching hit. The CSS file returned by Google is only 4 lines of text per font returned. That's only about 200 bytes per font. That CSS file contains a src css attribute that points to another URL (like to a woff2 file). If that src URL is the same for FVD and non FVD, then the font is still cached. I don't know how that FVD url is generated though. Perhaps you would have better insight into that. So, every call to a Google web font font results in two queries. The first is very tiny, the second contains the font file itself. On another note: Karabiner looks cool :-) |
I guess that it can seem odd to want to avoid losing the caching of the css :) I hope you'll find this more reasonable if you consider the scale of Google Fonts; at http://www.google.com/fonts#Analytics:total you can see that the single most popular family, Open Sans, has a CSS request served by Google Fonts API 17,789,030,914 times a week, or 2,541,290,131 times per day. So these very tiny pieces of CSS add up, and caching them is important for making web fonts as fast as possible :) |
BTW, over in typekit/fvd#6 (comment) Bram says typekit is moving away from fvd. |
* Added VerticalMetrics.md A guide to setting vertical metrics for Google Fonts. * Replaced Roman numerals with standard numerals * Update info on Glyphs scripts
* Added VerticalMetrics.md A guide to setting vertical metrics for Google Fonts. * Replaced Roman numerals with standard numerals * Update info on Glyphs scripts
I'm not sure if this is the pace to report this or the webfont loader repo, or both.
There are several fonts hosted by google that do not work with FVD shorthand.
Off the nearly 700 fonts hosted by google (All of which accept the FVD syntax) only these font URL's resulted in 404's
GET https://fonts.googleapis.com/css?family=Buda:n3
GET https://fonts.googleapis.com/css?family=Coda+Caption:n8
GET https://fonts.googleapis.com/css?family=Open+Sans+Condensed:n3,i3,n7
GET https://fonts.googleapis.com/css?family=UnifrakturCook:n7
These do work with the older, more verbose syntax. For example:
GET https://fonts.googleapis.com/css?family=Buda:300
The text was updated successfully, but these errors were encountered: