What GUI Toolkit Does FontForge Use?

FontForge is a widely used open-source font editor, but unlike many standard desktop applications that rely on GTK or Qt, it primarily utilizes a custom-built widget toolkit called Gdraw. This article explains the technical foundation of FontForge's graphical user interface, why it does not natively run on standard modern toolkits, and the ongoing modernization efforts surrounding its interface.

The Primary Toolkit: Gdraw

The standard FontForge interface is rendered using Gdraw (part of the internal gutils and gdraw libraries). George Williams, the original creator of FontForge, developed Gdraw from scratch in the early 2000s specifically for the application (then known as PfaEdit).

At the time of FontForge's inception, mainstream toolkits like GTK+ and Qt lacked robust support for complex Unicode text rendering, advanced typographic features, and the precise vector spline manipulation that font design demands. To achieve complete control over input handling, rendering speed, and custom vector drawing surfaces, Williams implemented his own custom windowing and widget system.

How Gdraw Operates Across Platforms

Gdraw is a lightweight abstraction layer designed to draw directly onto low-level graphics subsystems rather than using modern desktop widget libraries:

  • Linux and Unix-like Systems: Gdraw communicates directly with the X Window System via Xlib. It manages its own windows, menus, dialog boxes, and canvas redraws without depending on GTK or Qt.
  • macOS: Because Gdraw depends heavily on X11 architecture, FontForge historically ran through XQuartz. Recent versions wrap the application to feel more integrated, but the underlying rendering remains tied to the X11 drawing model.
  • Windows: FontForge is typically compiled using MinGW/MSYS2, relying on a compatibility layer or local X server implementation to bridge Gdraw calls to the native Windows display system.

Cairo Integration

While Gdraw manages the widgets, windows, and event loops, modern versions of FontForge integrate the Cairo 2D graphics library. Cairo handles anti-aliased vector rendering within the font glyph canvas and preview panes, giving the drawing view crisp lines and smooth curves that the original pure-Xlib rendering lacked.

GTK Transition Efforts

Over the years, developers have attempted to replace Gdraw with modern toolkits, most notably GTK+ 3. A major porting initiative began around 2012 to make FontForge look like a native desktop application, improve accessibility, and eliminate the legacy X11 dependency.

While significant progress was made in prototyping a GTK-based interface, a full transition was never completed. Gdraw is deeply coupled with FontForge's core data structures, undo/redo stacks, and outline editing tools. Fully decoupling the editor canvas from Gdraw requires rewriting vast portions of the codebase. As a result, the official releases of FontForge continue to rely on the custom Gdraw toolkit as their primary graphical engine.