2014-09-21 16:09:01 UTC
Firefly bitmap glyphs to pcb symbols
This more polished version of the code fixes a boundary condition affecting
2 or 3 glyphs in the Firefly CJK 16x16 font set with pixels along edges.
The utility compiles easily with gcc and one need only feed it with a bdf
symbol definition or a stream of bdf symbol definitions to produce PCB
symbols for insertion into a PCB layout, with suitable re-labeling to
comply with the current limitations imposed by the implementation of
"Symbol" which only copes with ~ 127 symbols.
cat mydesiredglyph.bdf | ./pcbGlyphTool > NewSymbolForPCB.pcb
will list other options, including -d "dot matrix rendition", -o "omitting"
conversion of diagonals into strokes, -v "verbose" mode, and -x generate an
It should convert any bdf formatted bitmap up to 16x16 pixels into
SymbolLine strokes replacing contiguous pixels in horizontal, vertical or
diagonal directions, and it will render remaining "orphan pixels" as a dot.
This is the same tool I used to generate the Hebrew font from the Unifont
bdf while testing,
Someone may find the utility or its subroutines useful. One thought is
implementing the ability to do on the fly extraction of a unicode bdf
definition from a bdf font file into a PCB layout from a geda PCB menu or a
button analogous to the "insert text" button. The issue of extending
"Symbol" to support more than the ASCII code page would need to be dealt
I make no claims as to the code's elegance or fitness for purpose...