Converting classic Slackware fonts (.fnt) to TrueType fonts?
Back in Slackware 3.5 I fell in love with the rl.fnt font:
http://imgur.com/KfB2YQj.png I recently re-discovered it while playing around with a LIVE CD archive I found online... Nowadays I spend most of my time in Windows, but I'm falling back in love with Linux and I'd really like have this font... everywhere (Windows, Raspbian, Slackware 14+, etc). So, I'd love to convert it (or be pointed to a conversion that's already been done...) to a monospace TrueType font. The crux of the issues is that I can't find an online converter anywhere that understands the .fnt format. Most websites even claim it's an archaic Windows bitmap font format (Windows doesn't recognize it anymore). I've verified that Windows recognizes .fon bitmap font files, but not .fnt (if it ever did...). Any clue on how to get this to happen? Caveats: According to http://www.techrepublic.com/blog/win...ommand-prompt/, in order for the font to be recognized in Windows: Code:
In addition to the monospaced criteria, Microsoft also specifies that the font for the Command Prompt: So, I'd also love to know how I can guarantee criteria 2 and 3. (1 and 4 are irrelevant). Thanks in advance for the help! About me: I'm a developer who is getting "back into Linux" after a 20 year hiatus. Back in my college days (mid-90s) I spent most of my time in Slackware 3.5 (and, admittedly I spent most of that time in a telnet client playing MUDs, shell scripting, and abusing the university's dial-up access with auto-re-dialer scripts my roommate and I hacked together...). I dual-booted to Windows 95 when I wanted to play games. ;-) |
I don't think that will be easy. In case you didn't find it already the spec is here.
I tried to open it in fontforge but it does not recognize it: Code:
This does not appear to be a Windows FNT for FON file |
Thank you!
Excellent find on the Classic Windows FNT spec. The older RL.FNT seems to be identical to the newer one. Same size, same hash: Code:
C:\Users\Jeremy\Desktop> Get-FileHash .\2.1.rl.fnt So, any idea where to find the file format definition for the "classic" Slackware .FNT format? :) |
Found some interesting stuff (I think):
The README that explains where the fonts come from The source zipped archive vfont2.zip The script used to extract the fonts from the archive EDIT. First link fixed, thanks bassmadrigal. PS the man page included in vfont2.zip states that this font was created in 1989 for OS/2 ;) |
|
...hit Quote instead of Edit, sorry...
|
Thank you again!
It certainly explains the pedigree (I did see the SCRIPT before but realized it wasn't doing much but copying 4k chunks from another file). However, it doesn't provide insight into the actual binary .FNT format being used... at least not in an actionable way. I suppose whatever font processing & display code Slackware is using could give some hints. I'd rather not reverse-engineer the format from the code, but if I get bored/motivated enough I suppose I could resort to that. |
Quote:
Code:
$ file rl.fnt Code:
FONT FORMATS Code:
$ raw2psf rl.fnt rl.psf Code:
$ psf2[TAB] Code:
$ psf2bdf rl.psf rl.bdf Hope that helps. |
Thank you very much, Diantre!
This should be most helpful... I'll report back once I make some progress. :) [edit]: Made some early progress just hacking around the .FNT file given the spec hint in the setfont MAN page you referenced... I'm able to tease the glyphs out easily with a little script I wrote. Result sample: Code:
----816: Code:
param($font = "RO.FNT") |
2 Attachment(s)
Quote:
For those interested, I have attached the file itself. Due to the restrictions of LQ, I've had to add the .txt extension to get it to upload, but once you've downloaded, do the following: Code:
mv rl.otf.txt rl.otf Regards, Matt P.S. The font option displayed in Konsole's font selection dialog box is 'psf', for a reason I have yet to fathom. Probably someone who is more familiar with fonts could post why this is happening. |
Very cool.
Might I inquire as to how you made the jump from fnt (or bdf, etc) to otf? |
Quote:
Code:
Then I used the command: Code:
psf2bdf rl.psf rl.bdf In fontforge, I opened the file, went to Element --> Font Info, clicked on 'General' on the left side, change 'Em size' to a power of 2; in this case, 2^10, or 1024, then clicked OK. To save, I went to File --> Generate Font. Where it says 'No Outline Font', I clicked on the drop-down menu and selected Open Type (CFF), renamed the file above the selection box to reflect the new extension, and clicked 'Generate'. Viola! an OpenType font I could drop right into /usr/share/fonts/OTF. Ran the commands to register the new font, and configured Konsole to use the font. Retro goodness! |
Awesome. Thank you very much for the blow-by-blow... and for sharing the OTF!
|
Converting classic Slackware fonts (.fnt) to TrueType fonts?
You're welcome. I most certainly enjoyed the challenge. It's why I run Slackware in the first place. Keeps the mind sharp, especially as I am getting older and forgetting things. :(
|
1 Attachment(s)
Quote:
Here's a snapshot of what it looks like in FontForge: Attachment 34077 Any idea on what else we can try? |
All times are GMT -5. The time now is 07:51 AM. |