pcb-rnd knowledge pool


Line, Polygon and Arc objects now supported in pcb-rnd font glyphs

fontedit by Erich S. Heinzle (VK5HSE) on 2017-04-09

Tags: howto, font, gui, editing, curves, arc, polygon, menufile

node source



Abstract: Howto for the built-in font editor, plus some tips about the lihata based font file format and about using arcs and polygons in fonts.

  Further work on multiple font support in pcb-rnd   handling has  led to the addition of support for not just polygons within glyphs, but also arc objects. Until now, gEDA PCB and pcb-rnd have been limited to line objects only within glyphs.

pcb-rnd 's   :FontEdit   code has been updated to allow arcs to be edited and saved by those wishing to create their own fonts or modify existing fonts. Those familiar with   :FontEdit   and   :FontSave   will appreciate the ability to use arcs when creating rounded glyphs in a new font:

Fonts with arc objects can be saved as standalone font files in pcb-rnd's new lihata (.lht) file format. These font files can then be easily shared, and loaded into a pcb-rnd layout with the font load window (CTRL-SHIFT-F).

Here is an example of an arc based default font, (default_arc.lht) alternative to the legacy default_font:

Multiple fonts can be used simultaneously in pcb-rnd; here is the traditional default_font shown above the arc based example font:

Advantages of the new arc-based font are more compact gerber export, and more compact font description files, since three or more lines can be replaced with just one arc description.

The traditional default_font remains the default font in pcb-rnd, but users are free to try out the example arc based font in the trunk/font directory in addition to the traditional default_font in the trunk/src directory if keen.

The default_arc.lht example arc based font is a working example of the new font file syntax, and can be referred to by those keen to design their own fonts.

Those crafting new font files in lihata (.lht) format should find the format quite human parseable, and need only note that hashes of the form

  ha:j {


which contain details for a particular glyph, in this case, "j", need have the character escaped if the hash refers to one of the following ASCII chars:

  {     }      \      :      ~     ;     =     &     #

and also ASCII 32, the space character, for lihata parsing to behave properly.

Examples of how to do this can be seen in the default_arc.lht example file, either by pulling down an svn copy of the repo, or browsing the repo online at


pcb-rnd also supports multiple font editing options with the updated   :FontEdit   code via the miantenance menu, allowing editing of the current font within a layouts, or editing of fonts residing on disk: