pcb-rnd knowledge pool


Multiple font support now available in pcb-rnd

multifont by Erich S. Heinzle (VK5HSE) on 2017-02-21

Tags: font,multiple font,multifont,text, menufile

node source



Abstract: Using multiple different fonts on a board


Modifications to the pcb-rnd core, along with the new lihata (.lht) file format, have allowed multiple font support to be implemented relatively quickly.

Fonts used in a layout are saved in the lihata file format file, but not if the layout is saved in the current gEDA PCB (.pcb) format.

The multiple font support leverages previous work done converting Hershey format fonts sourced from the open source and open hardware EggBot platform.

The translate2geda utility can now batch convert the hersheydata.py font archive used by the EggBot. This has made around 50 fonts available for use.

The fonts are managed with a font selector window:

After loading and selecting a font, it can then be used:

Fonts can also be specified for element text attributes, i.e. the RefDes, since element text attributes in the lihata file now include a font ID, allowing a RefDes to have something other than the default font used for rendering:

It should be noted that any particular font is still subject to a 127 char symbol space limit.

Mapping for Greek and Cyrillic is phonetic, and the Hebrew font adheres to a common keyboard mapping.

Apologies to any fluent Greek, Russian or Hebrew speakers who might take exception to Google Translate's advice during the making of the screenshot!

I expect that the Greek font should come in useful for "mu" and "Omega" in particular, no matter what the local language is.

The new font support is available from the pcb-rnd svn .

Enjoy responsibly!!

P.S. For those unaware, https://github.com/erichVK5/FootprintTextForPCB can be used for rendering text labels within footprints being created for use within both gEDA PCB and pcb-rnd.