h4l/headgear

Render text as paths to remove the need for custom fonts

Closed this issue · 2 comments

h4l commented

The NFT Card SVG image includes the name & serial number of the NFT as text. The text uses the Reddit Sans font, via a web font hosted by Reddit. Currently we reference the font via https in the SVG file. This has some trade-offs:

  • Pro: smaller SVG file size
  • Con: SVG file will break in the future if Reddit changes their font's URL
  • Con: Some tools can't/won't load web fonts (looking at you, Inkscape)
  • Pro: text is actually in the file, can be selected, copied etc
    • (Although this could be retained when using paths, using 0% opacity text)

An intermediate step could be to embed the fonts as data URIs (like we do for background images).
Also, the fonts could be re-hosted on IPFS and referenced there, to remove the dependency on Reddit hosting them.

h4l commented

Implemented in #20, this will be in the next release.