Erich Heinzle
2014-09-21 16:09:01 UTC
I have finished off the code I used to generate Chinese/Japanese/Korean
Firefly bitmap glyphs to pcb symbols
http://users.on.net/~esh/geda/pcb/src/fonts/pcbGlyphTool-v1.0.c
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.
i.e.
cat mydesiredglyph.bdf | ./pcbGlyphTool > NewSymbolForPCB.pcb
./pcbGlyphTool -h
will list other options, including -d "dot matrix rendition", -o "omitting"
conversion of diagonals into strokes, -v "verbose" mode, and -x generate an
xbm mode.
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,
http://users.on.net/~esh/geda/pcb/src/fonts/gEDA-PCB-Unifont-Hebrew.pcb
http://users.on.net/~esh/geda/pcb/src/fonts/UnifontDerivedHebrew_Font
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
with.
I make no claims as to the code's elegance or fitness for purpose...
Cheers
Erich
Firefly bitmap glyphs to pcb symbols
http://users.on.net/~esh/geda/pcb/src/fonts/pcbGlyphTool-v1.0.c
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.
i.e.
cat mydesiredglyph.bdf | ./pcbGlyphTool > NewSymbolForPCB.pcb
./pcbGlyphTool -h
will list other options, including -d "dot matrix rendition", -o "omitting"
conversion of diagonals into strokes, -v "verbose" mode, and -x generate an
xbm mode.
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,
http://users.on.net/~esh/geda/pcb/src/fonts/gEDA-PCB-Unifont-Hebrew.pcb
http://users.on.net/~esh/geda/pcb/src/fonts/UnifontDerivedHebrew_Font
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
with.
I make no claims as to the code's elegance or fitness for purpose...
Cheers
Erich