Live data from Hacker News

In defense of webfonts

robinrendle.com

1–2 of 2 posts

Re: In defense of webfonts

#2
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,");
  }
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.