I've seen that some Google Webfonts now use WOFF 2.0. Can I somehow convert my existing WOFF-fonts to this new (and supposedly better format)? And how?
I could't find any WOFF to WOFF2 converters, but you can easy convert your current WOFF font to TTF with any service like this. And then using this WOFF2 cheat sheet, convert TTF to WOFF2.
I tested those steps with my fonts, converted font WOFF -> TTF -> WOFF2 works fine.
Certainly! You can convert the existing woff files to the new format. You will get more than 30% improvement on the compression ratio.
Even though browser support is limited at this moment
http://caniuse.com/#feat=woff2
It will eventually change. You should use the @font-face fall back and start putting these kind of directives in your css now.
@font-face {
font-family: MyFont;
src:
url('font.woff2') format('woff2'),
url('font.woff') format('woff');
}
You can use the following tools to convert from ttf/woff to woff2.0
I could't find any WOFF to WOFF2 converters, but you can easy convert your current WOFF font to TTF with any service like this. And then using this WOFF2 cheat sheet, convert TTF to WOFF2.
I tested those steps with my fonts, converted font WOFF -> TTF -> WOFF2 works fine.
I managed to convert with https://everythingfonts.com/woff-to-woff2 did it for my fontawseome icons
Font Squirrel generator now includes WOFF2 in it's generated fonts. So you can create it that way from your TTF file.
On Ubuntu, you can convert WOFF to OTF/TTF and then to WOFF2:
woff2sfnt myfont.woff > myfont.ttf
woff2_compress myfont.ttf
Package dependencies:
sudo apt install woff-tools woff2
© 2022 - 2024 — McMap. All rights reserved.