How to Set a License URL in FontForge Metadata
You can set a license URL in FontForge's metadata tables by accessing
the OpenType name table settings within the application.
OpenType specifications designate Name ID 14 specifically for the
License Info URL, and FontForge allows you to define this record either
through the graphical user interface or via its Python scripting engine.
This guide explains how to locate the proper metadata fields and embed
your license link directly into your font files.
Setting the License URL Using the GUI
To configure the license URL using the FontForge graphical interface, follow these steps:
- Open your font file in FontForge.
- Navigate to the main menu and select Element >
Font Info (or press
Ctrl+Shift+Fon Windows/Linux,Cmd+Shift+Fon macOS). - In the sidebar of the Font Info dialog, click on TTF Names.
- Look through the list of entries for License URL (corresponding to Name ID 14).
- If License URL already exists, double-click the
string value next to your target language (typically "English (US)") and
paste your complete URL (for example,
https://openfontlicense.org). - If the entry does not exist, click the Add or New button, select License URL from the dropdown menu, set the language, and enter your URL.
- Click OK to save the metadata changes.
- Export your updated font by selecting File >
Generate Fonts... to write the changes to the compiled
binary (
.ttf,.otf, or.woff).
Setting the License URL Using Python Scripting
If you automate your font builds, you can assign the license URL using FontForge's Python API:
import fontforge
# Open the font file
font = fontforge.open("MyFont.sfd")
# Append or replace the License URL (Name ID 14) in the SFNT name table
# Parameters: (Language, String Name / ID, Value)
font.appendSFNTName("English (US)", "License URL", "https://example.com/license")
# Generate the output font
font.generate("MyFont.ttf")Why Name ID 14 Matters
OpenType font specifications define Name ID 14 as the standardized location where software, operating systems, and web repositories look for remote licensing terms. While Name ID 13 provides the full text of the license agreement, Name ID 14 should strictly contain a valid, accessible web address referencing the full terms.