juice icon indicating copy to clipboard operation
juice copied to clipboard

Quick question on embedding a font as base64

Open dderiso opened this issue 9 years ago • 2 comments

Cheers Automattic,

Thanks for the awesome library! I was wondering if there is a way to use juice (or if you have any other recommendations) to embed a font, such as font-awesome, inline as a base64 at the top of the page? Here is a relevant snippet (from http://stackoverflow.com/a/24549189/1438550):

@font-face {
    font-family: "p22-underground-1";
    font-style: normal;
    font-weight: 400;
    src: url("data:font/opentype;base64,d09GRk9...yn4b8C3JEZAA==");
}

Thanks, Dave

dderiso avatar Feb 12 '16 01:02 dderiso

@dderiso see https://github.com/crocodilejs/custom-fonts-in-emails?

niftylettuce avatar Jun 10 '17 05:06 niftylettuce

@niftylettuce is not really useful if you already have a page or html/css from a big project. Probably if you create from scratch, then somehow you can apply custom-fonts-in-emails to each text and transform it to images, this is what this lib does. But for an already existing project, we just need @font-face { to work from css.

seyfer avatar Nov 09 '21 16:11 seyfer