Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add b64 output #131

Closed
salazarm opened this issue Oct 21, 2013 · 10 comments
Closed

Add b64 output #131

salazarm opened this issue Oct 21, 2013 · 10 comments
Milestone

Comments

@salazarm
Copy link

src: url(data:application/font-woff;charset=utf-8;base64,xxxxx)format('truetype')
@jasmussen
Copy link

Would love to see this added.

Firefox blocks crossdomain font requests, so if you store your CSS file on a CDN which is common on larger sites, Firefox will block the font request. Base64 encoding the WOFF font and embedding it in the stylesheet sidesteps this issue, since the stylesheet and font file will be located on the same domain.

@folletto
Copy link

+1

It will help improving the browser support, and also in certain situations can be an optimization downloading just one piece. :)

@kaizau kaizau modified the milestones: 1.3.4, 1.3.* Feb 8, 2014
jvatic added a commit to jvatic/fontcustom that referenced this issue Feb 11, 2014
jvatic added a commit to jvatic/fontcustom that referenced this issue Feb 11, 2014
@jaydenseric
Copy link

+1

Can we merge these commits and get this happening? This is pretty essential. I would like to use this right away.

@jleider
Copy link
Contributor

jleider commented Apr 15, 2014

You should be able to add a cors header to your assets to get around this issue. http://enable-cors.org

Base64 encoding assets adds significant overhead and requiring it in the HTML of every page you need it negates the purpose of using font icons does it not?

@jtomaszewski
Copy link

@jleider, Adding CORS header to every asset server I use is much bigger overhead than just enabling us to have b64 encoded font in CSS.

We don't include it in HTML of every page. We include it in CSS which is downloaded only once anyway (because it's gzipped and cached just as a font file).

@jaydenseric
Copy link

@jleider Base64 embedding WOFF fonts directly into the stylesheet is arguably best practice in an IE9+ world. They are still vector just the same, but they are downloaded at precisely the same time as the styles and all in one request. As long as your stylesheet is cacheable so are the fonts embedded within.

@KyleAMathews
Copy link

+1000 Most of the time I only am using a handful of fonts and it's far more efficient to embed the font directly in CSS.

@KyleAMathews
Copy link

Also, embedding the font means you don't get the annoying flash-in when your font loads. I've Base64 embedded fonts for years using icomoon and would like to be able to keep doing that.

@KyleAMathews
Copy link

In the meantime I'm using https://www.npmjs.org/package/gulp-cssfont64 and adding the embedded font (w/ my two icons) to my scss project and and am manually editing the css file fontcustom generates to remove its font-face rules. Firefox has icons now!

@marvinli
Copy link

+1. This would be so useful!

@salazarm salazarm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

9 participants