d2/d2renderers/d2fonts
2023-10-24 16:31:30 -07:00
..
encoded fuzzybubbles 2023-07-01 20:56:48 -07:00
testdata/d2fonts more accurate 2023-05-31 16:58:10 -07:00
ttf fuzzybubbles 2023-07-01 20:56:48 -07:00
d2fonts.go d2fonts.FontEncodings sync.Map 2023-10-24 16:31:30 -07:00
d2fonts_test.go fix 2023-05-31 16:30:11 -07:00
NOTICE.txt 2022-11-21 04:32:58PM 2022-11-21 16:32:58 -08:00
README.md Fixing typos 2023-04-14 07:48:22 +02:00

d2fonts

The SVG renderer embeds fonts directly into the SVG as base64 data. This is to give deterministic 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.