Environment Variables That Affect FontForge
FontForge relies on several standard and application-specific environment variables to control its execution, user interface behavior, scripting environment, and system integration. Understanding these variables allows developers and typographers to customize FontForge's operation, troubleshoot build issues, automate font generation workflows, and override default application paths.
FontForge-Specific Variables
FONTFORGE_LOADPREFS: Controls how FontForge loads its preference files on startup. Setting this toNeverprevents FontForge from reading existing preferences, which is useful for testing or running clean, reproducible command-line builds.AUTOTRACE: Defines the path or command used to invoke an external autotracing utility. If you use Autotrace or Potrace to convert imported bitmap graphics into vector outlines, FontForge checks this variable to locate the executable.BROWSER: Specifies the path to the web browser binary used by FontForge to display offline or online documentation when the user requests help from the interface.
Localization and Interface Variables
LANG,LC_ALL, andLC_MESSAGES: FontForge uses standard POSIX localization variables to determine the language of the graphical user interface and error messaging. SettingLC_ALL=CorLANG=Cforces FontForge to launch in standard English, which is often used in automated build scripts to standardize console output.DISPLAY: On Unix-like systems running the X Window System, this variable determines which X display server FontForge connects to for rendering its GUI.GDK_SCALEandGDK_DPI_SCALE: For versions of FontForge built with modern GDK/GTK backends, these variables manage HiDPI scaling factors for UI elements and text.
File Paths and Storage
HOMEorUSERPROFILE: Dictates the base directory where FontForge expects user-level configurations, macros, and cache folders (typically located within~/.FontForgeor equivalent OS application data paths).TMPDIR,TEMP, orTMP: Determines the directory FontForge uses to write temporary files during font generation, rasterization testing, and intermediate conversions. Ensuring this points to a high-speed, writable directory prevents I/O bottlenecks during batch operations.
Scripting and Python Integration
PYTHONPATH: When executing FontForge's Python extension or running FontForge with Python scripting enabled, this variable directs the embedded Python interpreter to third-party modules, packages, and custom font manipulation scripts.PYTHONHOME: Used when embedding Python to point to the standard Python libraries. If FontForge is executed in an isolated environment (such as a virtual environment), setting this ensures FontForge binds to the correct Python standard library installation.