d2/d2renderers/d2fonts
Alexander Wang c859ad3ca7
fix encoding
2022-12-22 00:41:05 -08:00
..
encoded fix encoding 2022-12-22 00:41:05 -08:00
ttf implement sketch 2022-12-21 20:55:27 -08:00
d2fonts.go implement sketch 2022-12-21 20:55:27 -08:00
NOTICE.txt 2022-11-21 04:32:58PM 2022-11-21 16:32:58 -08:00
README.md oss 2022-11-03 06:54:49 -07:00

d2fonts

The SVG renderer embeds fonts directly into the SVG as base64 data. This is to give determinstic outputs and load without a network call.

To include your own font, e.g. Helvetica, you must include the Truetype glyphs:

  • ./ttf/Helvetica-Bold.ttf
  • ./ttf/Helvetica-Italic.ttf
  • ./ttf/Helvetica-Regular.ttf

You must also include an encoded version of these of mimetype application/font-woff:

  • ./ttf/Helvetica-Bold.txt
  • ./ttf/Helvetica-Italic.txt
  • ./ttf/Helvetica-Regular.txt

If you include a font to contribute, it must have an open license.