On Tue, Feb 17, 2009 at 08:01:35AM +0100, Christian Perrier wrote: > > Forget about it... I probably misused FontForge. What about the > attached file?
The reason bdf2psf fails on this font is that it doesn't have AVERAGE_WIDTH property (I don't know if the standard requires this property). However even if one adds this property to the font, bdf2psf will be unable to generate usable font. Bdf2psf expects BDF font to have encoded chars, i.e. character No.138 has to be the symbol with unicode 138. Your bdf font however uses the encoding of the original console font. Fortunately using google I found another bdf2psf utility at http://home.comcast.net/~fbui/bdf2psf.html This is a very simple program - not as sofisticated as my bdf2psf so it is exactly what we need in this case. It also has one limitation - it requires the source BDF font to have at most 255 characters so I had to use gbdfed in order to remove one symbol (I removed the symbol with code 0). The resulting psf font doesn't have embedded sfm table. We can take this table from the original font. This can be done by the following commands: cp /usr/share/consolefonts/lat1-12.psf.gz orig.psf.gz gunzip orig.psf.gz psfgettable orig.psf >orig.sfm vi orig.sfm # remove the line for the removed symbol 0 psfaddtable lat1-12b-12.psf orig.sfm lat1-12b-12new.psf I have attached lat1-12b-12new.psf to this message. An alternative approach would be to use orig.sfm in order to add new "encoding" to trbdf utility (from the package trscripts). Then your font can be converted from this new "encoding" to unicode. Finaly the resulting font can be converted to psf using my bdf2psf. Anton Zinoviev
lat1-12b-12new.psf
Description: Binary data

