[comp.windows.x] BDF decomposition

dl2n+@ANDREW.CMU.EDU (Daniel Edward Lovinger) (10/18/88)

        Does anyone have or know of a utility to decompose a BDF format font
into X11 bitmaps (and possibly the reverse)? I have all of the specs in front of
me, but I wouldn't want to reinvent the wheel on this one.

-------------------------
Dan Lovinger                  dl2n@andrew.cmu.edu
Dept. of Physics              R746DL2N@CMCCVB.bitnet
Carnegie Mellon University

Disclaimer: The expressed views are those of my Illuminati!
And furth.....<ms> Segmentation fault (core dumped)

robert@pttesac.UUCP (Robert Rodriguez) (10/20/88)

In article <4XKqiay00V4T04d0Uc@andrew.cmu.edu> dl2n+@ANDREW.CMU.EDU (Daniel Edward Lovinger) writes:
>
>        Does anyone have or know of a utility to decompose a BDF format font
>into X11 bitmaps (and possibly the reverse)? I have all of the specs in front
>of me, but I wouldn't want to reinvent the wheel on this one.
>

Just so happens I tried to do this last weekend.  I wanted to extract
the enterprise out of the ent.bdf font file.  I guessed, and it worked.
The hack is so ugly I'll spare you, but the concept is like this.
The characters in the bdf files are stored in hex.  Convert those
hex numbers into 4 byte binary.  Feed that to the Portable BitMap
package and you are on your way.  For example:

Strip character out of bdf file.

09f30
012f3

Convert that into binary (this is where the crude hack comes in).

00001001111100110000
00000001001011110011

Edit that file to insert the width and height.

2 20				(or is that 20 2 ?)
00001001111100110000
00000001001011110011

Send that file to pbmtoxbm and you are done.

Hope that helps.

Robert (pacbell!pttesac!robert)