How to Suppress Generation Warnings in FontForge
When generating font files in FontForge, the application frequently displays warnings regarding non-integral coordinates, overlapping contours, or missing metadata. While these alerts help catch structural errors before finalizing a typeface, they can disrupt automated workflows or become repetitive when you intentionally ignore specific design choices. You can suppress or bypass these generation warnings using the graphical user interface export settings, general preferences, or automated scripts.
Disable "Validate Before Saving" in the Export Options
The most direct way to eliminate warning prompts during manual exports is to turn off pre-generation validation:
- Open your project in FontForge.
- Go to File > Generate Fonts.
- Choose your desired export format (such as TrueType or OpenType).
- Click the Options button next to the format dropdown.
- In the options panel, locate and uncheck Validate Before Saving.
- Click OK, then proceed to click Generate.
Disabling this option prevents FontForge from running its internal validator prior to compilation, allowing the export to proceed without interruption dialogs.
Adjust Validation Rules in Preferences
If you want to keep general validation active but silence specific, persistent warnings, you can customize which tests FontForge executes:
- Navigate to File > Preferences (on macOS, FontForge > Preferences).
- Under the Generic or Font Handling category, look for Validation.
- Uncheck non-critical checks that trigger your specific warnings,
such as:
- Check for self-intersecting paths
- Check points are at integers
- Check glyph names match specification
- Click Save or Apply to make the changes permanent across all sessions.
Suppress Warnings in Python Scripting
When automating font compilation through FontForge’s Python extension
(fontforge module), interactive popups are already
suppressed, but console warnings may still clutter output logs. You can
enforce a clean export by passing specific flags to the
generate() method or redirecting standard error
streams.
Use the flags parameter to ignore minor issues during
export:
import fontforge
# Open font
font = fontforge.open("MyFont.sfd")
# Suppress specific transformations that trigger warnings
# Available flags include 'opentype', 'round', 'dummy-dsig', etc.
font.generate("MyFont.ttf", flags=("opentype", "round"))
font.close()To mute output entirely at the terminal level:
import os
import sys
import fontforge
# Suppress stderr output from FontForge backend
null_fds = os.open(os.devnull, os.O_RDWR)
save_stderr = os.dup(2)
os.dup2(null_fds, 2)
try:
font = fontforge.open("MyFont.sfd")
font.generate("MyFont.otf")
font.close()
finally:
# Restore stderr
os.dup2(save_stderr, 2)
os.close(null_fds)Suppress Warnings in Native FontForge Scripts
If you are using the legacy .pe scripting language,
warnings during font creation can be handled by setting the script error
level or supplying generation flags directly inside the
Generate function:
Open($1)
# Generate with bitmap/outline options that do not halt on warnings
Generate($1:r + ".ttf", "", 0x08)
Quit(0)
Adding the flag 0x08 (or other format-specific
hexadecimal bitmasks defined in the FontForge script specification)
bypasses interactive error prompts and forces file creation.