d2/d2renderers/d2fonts
Kevin David 500e3e179e
SourceCodePro bold/italic: use .woff for encoded fonts instead of .ttf
Sourced from: https://github.com/adobe-fonts/source-code-pro/releases/tag/2.038R-ro%2F1.058R-it%2F1.018R-VAR

Translated with the following commands:
```
base64 -i ~/Downloads/WOFF-source-code-pro-2.038R-ro-1.058R-it/TTF/SourceCodePro-It.ttf.woff -o ./d2renderers/d2fonts/encoded/SourceCodePro-Italic.txt
base64 -i ~/Downloads/WOFF-source-code-pro-2.038R-ro-1.058R-it/TTF/SourceCodePro-Bold.ttf.woff -o ./d2renderers/d2fonts/encoded/SourceCodePro-Bold.txt
```

I used the `.ttf.woff` files because that seemed "closer" to the original `.ttf` files included, but I'm not sure if that's correct.
2023-01-24 21:20:16 -05:00
..
encoded SourceCodePro bold/italic: use .woff for encoded fonts instead of .ttf 2023-01-24 21:20:16 -05:00
ttf d2renderers: d2fonts: add bold + italic styles for Source Code Pro 2023-01-23 00:35:19 -05:00
d2fonts.go d2renderers: d2fonts: add bold + italic styles for Source Code Pro 2023-01-23 00:35:19 -05: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.