You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Sadly - glyphs that have a horizontal offset (mostly occurring in icon fonts) are normalized to zero while their bounding boxes stay the same. Results are glyphs that should've been centered in a box is now aligned left... :(
And serve WOFF or WOFF2 base64 encoded in a JSON file depending on the outcome. Basically like how The Guardian does it. This was an early prototype mimicking that behavior (without WOFF2 detection) https://codepen.io/CrocoDillon/pen/dkcbs , enjoy! :)
In case anyone else has tried to retrieve the google hosted .woff2 in latin subset only, it will show all subsets(for some reason). To avoid that, it's possible to include the full range of characters in the url:
You can also download the full google font package on my site[ https://iautomation.us ] in case anyone wants to quickly grab the files to host locally..
You can also easily get woff2 files (and all other formats for any combined subset/charset) of any Google web font via my lil' service google-webfonts-helper.
Thanks for this great gist, I will embed it in a special FAQ on the front page of my service ASAP.
Can you add a warning here about Data-URI embedding multiple file formats? It’s not a recommended practice, it negates the page weight benefits offered by WOFF2 if you include both Data URIs in a single file.
https://onlinefontconverter.com has a online & a command tool to convert any font to woff2. You don't need to install any program. font-packs also works (you get one woff2 file for every font
As someone who uses the Data-URI method, is there an option for loading the correct type from the server? As @zachleat said, it makes no sense to embed both in a single file.
Hi guys. Made a NodeJS wrapper for the Google lib, thought you could be interested in adding it to this document: https://github.com/nfroidure/ttf2woff2
@anthony-geoghegan how can one figure out whether apache is using the W3C/IANA mime type (font/woff2) or the previous mime type (application/font-woff2)?
@reklis
Thanks.