Comments (10)
As this reproduces with Google Fonts without the webfont loader I'd say this is the right place. Thank you for the report.
from fonts.
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 i
(http://fonts.googleapis.com/css?family=Open+Sans:whatever) returns the r4.
these font URL's resulted in 404's
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.
from fonts.
@davelab6 and @rsheeter Thanks for looking into the 404 issue! I didn't notice that FVD just returned the n4 version of each font. Any chance that might get supported in the future?
from fonts.
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? :)
from fonts.
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. :-)
from fonts.
WRT caching, if you visit site 1 that uses family=Buda:n3
and site 2 that uses family=Buda:300
you would produce a cache miss for the CSS even if the font file got a cache hit. Accordingly, we do not currently intend to support FVD in the /css API (unless a presently unknown compelling reason emerges I suppose).
from fonts.
it's less characters and I'm a lazy typist
I can recommend tools like https://github.com/tekezo/Karabiner (mac) and https://github.com/AutoHotkey/AutoHotkey (windows) for helping with that :)
from fonts.
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 :-)
from fonts.
I don't think you're taking a caching hit
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 :)
from fonts.
BTW, over in typekit/fvd#6 (comment) Bram says typekit is moving away from fvd.
from fonts.
Related Issues (20)
- Update Noto Sans Math
- Request for Anton font to support cyrillic HOT 4
- Keep halt/vhal, chws/vchw OpenType features in CJK fonts
- Update Miriam Libre
- Noto Sans SC Macron Misalignment HOT 1
- Add Cause HOT 2
- COLRv1 font inconsistent color rendering HOT 7
- Update Noto Sans Egyptian Hieroglyphs
- Add Pixeltron Now HOT 1
- Update Anton font
- Update Noto {Sans,Rashi,Serif} Hebrew HOT 1
- Update Noto Emoji (monochrome) to 15.1 HOT 3
- KG Ten Thousand Reasons Add [Font Name] HOT 2
- Add LINE Seed JP HOT 3
- Saira font is always Thin when exported to PDF HOT 4
- Iranairx HOT 1
- Update Nunito Sans HOT 1
- Update Buenard HOT 2
- Add TsukuhouMIncho HOT 1
- Add Clarity-City HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fonts.