-
Notifications
You must be signed in to change notification settings - Fork 201
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
Host fonts locally #63
Conversation
This makes sure the Montserrat font is delivered along with the html & styles of the generated documentation. The practical upshots of this are that no more requests have to be made to google which is a privacy improvement and the proper fonts are now delivered even if the computer viewing the documentation is offline.
My only concern is that it includes only TTF font types, for better crossbrowser support, there should be full font-face package, that would also include eot, woff, woff2, svg, etc |
Hi @ar2rsawseen, TTF support has been pretty good for the last couple of years https://caniuse.com/#search=ttf Also this really just embedds the google fonts style sheets & the fonts and AFAICS google fonts does not offer woff, eot and the other formats; just ttf and otf. I think it still might be a good idea to add the other formats, but since this PR does not remove such support this might be better addressed in a separate issue. |
Sorry, what do you mean PR does not remove such support? It removes google fonts support, which actually provides loading other formats too and PR provides only ttf font loading (which is kind of a downgrade in a way) I know in overall, it probably would not mean much, and if it would have been a personal project, I would probably use ttf only too. But since it is "theme" used by many, I would rather not take any chances and use full font webpack :) And it is possible to get one from author herself directly: |
Ok let me merge this and will add the rest cases, myself, no worries :) |
Ah now I see what you mean :) |
Wait, this is a bit curious:
and
get me different results…seems to come from the user agent… |
Yeah, I think google fonts tries to determine your browser and its capabilities and delivered only files needed to that specific browser type :) |
Added rest of the font types here: |
This makes sure the Montserrat font is delivered along with the
html & styles of the generated documentation.
The practical upshots of this are that no more requests have to be
made to google which is a privacy improvement and the proper fonts
are now delivered even if the computer viewing the documentation is
offline.