[–] Jaruzel 10y ago ↗ I recently discovered that the 'src' attribute of the @fontface directive supports the inline 'data:' syntax (like you can do with images etc.).So you can basically do this: @fontface { ... src: url("data:font/opentype;base64,<base64-encoded-otf/ttf-file>"); } Although this expands the payload size slightly, it does remove the need for another round trip to a server (so renders potentially faster), and also gives you full control over your embedded fonts.
1 comment
[ 2.7 ms ] story [ 15.0 ms ] threadSo you can basically do this:
Although this expands the payload size slightly, it does remove the need for another round trip to a server (so renders potentially faster), and also gives you full control over your embedded fonts.