Search code examples
embeddinggoogle-fontsvariable-fonts

Roboto Flex variable font: get "full" woff file with all features to embed locally


I'd like to use the variable font Roboto Flex for animating various opentype parameters in realtime via css. This means i'd like to get the "full package" with all axis and stuff in one single font file. I'm talking specifically about the font provided by google here

The download option only contains a .ttf truetype file at 1.7MB file size – rather big file for use. I assume that woff/woff2 with their compression could shrink that.

Using various google web font downloaders seem to only provide the very basic file (400 weight, normal width, no opentype features), so that's not what i need. The github project for Roboto Flex has no .woff or .woff2 either.

Embedding the font via googles or @import method might work, but it seems to be very complicated to get the "full" set too. To add something to the "use on the web" sidebar, i have to select specific variations and it looks like that's what i'd get if i proceed, not the full package. I might get to some result there with tweaking the urls.

Anyway, i'd much prefer to get the font file for local embedding anyway, due to data protection issues in europe regarding google fonts.

So short question is: is there a way to get a woff file instead of ttf, or is there just no one available (yet)?


Solution

  • Try this utility: https://github.com/google/woff2 or use the file I just converted