How to Customize the FontForge Color Scheme
FontForge allows you to customize its interface color scheme, though it does not provide an integrated, one-click color picker in the primary settings menu. Because FontForge relies on its own custom UI toolkit called Gdraw, styling is handled through resource configuration files that follow the X11 resource format. This article explains how to locate these files, edit interface colors, apply ready-made dark themes, and configure FontForge to use your custom palette.
Understanding Gdraw Resource Files
FontForge’s appearance is controlled by plain text resource files rather than standard operating system UI frameworks like GTK or Qt. These files define hex color codes for elements such as window backgrounds, menus, font glyph canvases, and selection highlights.
To change the interface colors, you need to create or modify a resource file and tell FontForge to load it on startup.
Locating or Creating the Theme File
The configuration file can be created locally in your FontForge user directory:
- Linux:
~/.config/fontforge/or~/.FontForge/ - macOS:
~/Library/Application Support/FontForge/or~/.FontForge/ - Windows:
%APPDATA%\FontForge\
Inside this folder, create a text file named
theme.resource (or any name with a .resource
extension).
Editing Interface Colors
Open your resource file in any standard text editor. Colors are
defined using standard hex codes (#RRGGBB) or X11 color
names mapped to specific UI properties.
Below is an example of common properties you can add to establish a dark mode color scheme:
FontForge.Background: #2b2b2b
FontForge.Foreground: #dcdcdc
FontForge.Menu.Background: #333333
FontForge.Menu.Foreground: #ffffff
FontForge.CharView.Background: #1e1e1e
FontForge.CharView.Grid: #444444
FontForge.CharView.Foreground: #ffffff
FontForge.CharView.Fill: #555555
FontForge.CharView.Selected: #ff8800
FontForge.FontView.Background: #2b2b2b
FontForge.FontView.Foreground: #ffffff
FontForge.FontView.Selected: #0055aa
Key Elements to Customize
- Background and Foreground: Controls the general window background and basic text color across dialogs.
- CharView: Defines the editing canvas where glyph
contours are drawn. Changing
CharView.Backgroundchanges the workspace color, whileCharView.Gridadjusts the contrast of guideline markers and baseline indicators. - FontView: Controls the main grid displaying all
font characters. Adjusting
FontView.BackgroundandFontView.Selectedalters the primary overview canvas and cell highlight colors. - Menu and Buttons: Properties prefixed with
FontForge.MenuandFontForge.Buttonallow you to set distinct backgrounds and text states for dropdowns and interactive buttons.
Applying the Custom Scheme
Once you have written and saved your resource file:
- Launch FontForge.
- Navigate to File > Preferences from the top menu.
- Select the Generic section in the left panel.
- Locate the ResourceFile field.
- Enter the full path to your customized
.resourcefile, or use the file browser to select it. - Click OK to save the preferences.
- Restart FontForge to apply the new color scheme.
If any colors do not display properly, reopen the
.resource file to ensure there are no syntax errors or
invalid hex codes, then restart the application again.