...

Text file src/oss.terrastruct.com/d2/d2renderers/d2fonts/README.md

Documentation: oss.terrastruct.com/d2/d2renderers/d2fonts

     1# d2fonts
     2
     3The SVG renderer embeds fonts directly into the SVG as base64 data. This is to give
     4deterministic outputs and load without a network call.
     5
     6To include your own font, e.g. `Helvetica`, you must include the Truetype glyphs:
     7- `./ttf/Helvetica-Bold.ttf`
     8- `./ttf/Helvetica-Italic.ttf`
     9- `./ttf/Helvetica-Regular.ttf`
    10
    11You must also include an encoded version of these of mimetype `application/font-woff`:
    12- `./ttf/Helvetica-Bold.txt`
    13- `./ttf/Helvetica-Italic.txt`
    14- `./ttf/Helvetica-Regular.txt`
    15
    16If you include a font to contribute, it must have an open license.

View as plain text