Skip to content
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

[issue #541] hosted google fonts locally #544

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

shahhena95
Copy link

Now fonts are called from static folder instead of google URL.

@mitechie
Copy link
Member

We use both Cabin and Cabin Sketch in the site:

=Cabin|Cabin+Sketch:bold&v2

I also think this should be configurable. For the public site, it's a nice performance boost since the fonts come from the Google CDN and because it's a different domain most browsers will parallel this download along side ones from bookie.io as well.

http://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser

I'd prefer if this took a config option in the ini file and used that to determine if it should use local or remote urls for the fonts. This would require some logic then in the template based on that config.

@shahhena95
Copy link
Author

@mitechie Google sends different format according to the user agent. Like Firefox gets .woff format and Chrome gets .woff2 format .. Can you tell me what to do?

@mitechie
Copy link
Member

mitechie commented Jan 4, 2015

Looking at the css rules I think the trick is that we need to rely on the fontawesome.css.

If you look in the extensions where we use it locally the rule cascades the font file used like:

https://github.com/bookieio/bookie-chrome/blob/master/chrome_ext/fontawesome/css/font-awesome.css

  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants