I've previously written
about using the Windows shell font on Linux and in X11 on OS X. However, this method was only a stopgap for OS X - the native API (Cocoa) does not support bitmap fonts. My favorite editor, Slickedit, switched to Qt compiled in Quartz mode and no longer presents its interface through X11. A native interface is nice for many reasons, although it forces me to finally let go of my beloved vgaoem.fon.
All the monospace TrueType fonts I have been able to find are offensively awful and I reject the implicit suggestion from Apple that I should use them.
Extreme measures were in order. So, on my trusty Gentoo workstation, I fired up Fontforge, and created a new, empty font.
This all gets a little involved. I set the EM size to 1200 as I will be working with the 8x12 version of Bitstream Terminal (the font contained in vgaoem.fon). This produces a convenient 100-1 TrueType spacial unit to bitmap font pixel mapping. Then, I imported the BDF conversion of vgaoem.fon with the "as background" box checked. I had to add 50 to the default ascent size and subtract 50 from the descent size at this point in the Element->Font Info dialog and then transform all glyphs by y+50 with the box for transform everything checked. Furthermore, still with all glyphs selected, I set the right extent to 800 (8x12, remember?). Next, I selected all glyphs and executed the autotrace command with various arguments until it produced outlines that were completely correct in a small number of cases. The majority required laborious manual editing. The following screenshot was taken about halfway through the process of fixing/creating outlines.
After this, I imported codepage 437 to unicode table conveniently available from unicode.org
and forced the encoding to it. After setting a few font properties so that the font will be recognized as monospace, I generated a TTF and imported it into my font library on OS X. And, as you can see, all went according to plan.
Sweet justice. Thank the deity, I can finally upgrade Slickedit and close those twenty thousand XTerms in favor of terminal.app. In case you would like to try it, dear reader, here is the TTF file
(in the Google Docs interface, go to File->Download to get the TTF). FYI, it should be used in 12-point with antialiasing turned off.
Update: I noticed the vertical line spacing was too large. I edited some arcane fields in the font's TrueType header to fix this. Here is the updated version
. The following screenshot shows a subtraction between screenshots on OS X and Windows of the same text - the text is now rendered identically.
Note: to disable antialiasing of this font in XCode 4.5 on 10.8, execute
defaults -currentHost write -globalDomain AppleFontSmoothing -int 0
in the terminal.