Skip to main content

Why Would You Want to Do This?

The Open Font License (OFL) includes this clause (emphasis mine):

Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.

If the original full font file has the license information embedded in it, then the easiest way to adhere to that requirement is to retain the license information in the subset font file.

There's a lot of information online about subsetting fonts for self-hosting with pyftsubset, but none of the articles I found described how to keep the license information with the resulting subset. By default, pyftsubset strips the license metadata.

How to Do It

For OpenType fonts, the license information is stored in fields 13 & 14 of the name table.

With pyftsubset, use the --name-IDs option to include fields 13 & 14. For example:

$ pyftsubset \
  input.ttf \
  --name-IDs+=13,14 \
  --output-file=output.ttf

Add new comment