Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!pb2esac!pttesac!robert From: robert@pttesac.UUCP (Robert Rodriguez) Newsgroups: comp.windows.x Subject: Re: BDF decomposition Summary: Ugly hack Message-ID: <894@pttesac.UUCP> Date: 20 Oct 88 03:46:50 GMT References: <4XKqiay00V4T04d0Uc@andrew.cmu.edu> Reply-To: robert@pttesac.UUCP (Robert Rodriguez) Organization: Pacific*Bell ESAC, San Francisco, Ca. Lines: 35 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)