10

I think that the Fixedsys font is one of the most legible monospaced fonts for programming. It has zero antialiasing, with vertical lines mostly 2 pixels wide. Close to ideal for current monitor dot pitches, in my eyes (literally). Here is a sample:

Fixedsys sample

After years of Windows at home (for family reasons) and Linux servers at work accessed through Cygwin on Windows (for company policy reasons), with Fixedsys as the shell and IDE font, I have finally decided to switch to Ubuntu at home.

Eclipse and gedit are no problem, they accept a corrected version of the Fixedsys Excelsior TTF font that you can find here at comment #16 (filename: FSEX301-L2.ttf). But the Gnome Terminal only accepts monospaced fonts.

Although Fixedsys Excelsior is essentially monospaced, it contains larger glyphs (mostly for eastern languages), and also some ligatures. Since apparently ALL characters must have the same width for a font to be recognized as monospaced, Fixedsys Excelsior cannot be selected in all those contexts where monospaced fonts are required, including gnome-terminal.

So what is the easiest/cleanest way to use a Fixedsys clone in contexts that only accept monospaced fonts?

3
  • BTW, to use Fixedsys Excelsior in NetBeans, you have to add -J-Dswing.aatext=false to netbeans_default_options in /etc/netbeans.conf . Otherwise NetBeans will render it "colored" and blurry - this applies to Windows too Jul 17, 2013 at 20:51
  • Update to my previous comment: Netbeans 7.4 on Windows requires -J-Dawt.useSystemAAFontSettings=on to get rid of the anti-aliasing. Feb 26, 2014 at 16:05
  • On the MacBook Pro I have to work with the sample image is not sharp. The Fixedsys font appears to have grey border pixels. AFAICT this is because of the so-called "retina" display, a high resolution display which causes images within HTML to be scaled by a factor of two (yes, they preferred to break HTML and to have blurred images...). The same scaling applies to the font itself, spoiling it. On the other hand, high resolution displays greatly enhance the legibility off all fonts, obviating the need of Fixedsys. Jul 3, 2015 at 10:56

2 Answers 2

7
+50

This is the solution I found. I have tested it thoroughly several times, and I have been using the resulting font in a number of places for over 2 years now, but be warned: some parts of the procedure may be anywhere from suboptimal to plain wrong.

Before you ask "why don't you make the resulting font available", the answer is: "because I'm not sure I can do so". Font copyright is an intricate matter.


Download the corrected Fixedsys Excelsior font (file FSEX301-L2.ttf, at comment #16)

Install FontForge (e.g., from the Ubuntu Software Center)

Right-click on the FSEX301-L2.ttf file and open it with FontForge. In the Load Bitmap Fonts window that appears, click on No.

Click on File → Execute Script..., and copy&paste the following into the window that appears:

SelectAll()
foreach
   if (GlyphInfo("Width") != 80)
      DetachAndRemoveGlyphs()
   else
      b = GlyphInfo("BBox")
      if (b[0] < 0 || b[1] < -30 || b[2] > 80 || b[3] > 130)
         DetachAndRemoveGlyphs()
      endif
   endif
endloop
SelectNone()

Then select FF and click OK (it will take a while, you will have to wait until the Execute Script window disappears)

Click Element → Font Info... In PS Names change the Fontname, Family Name, and Name for Humans, e.g., by appending Mono (spaces are allowed only in the second and third string).

In the same Font Information window, select OS/2.
In the Misc. tab change the PFM Family to Monospace.
In the Metrics tab, set Win Descent Offset and HHead Descent Offset both to 0 (*).
In the Panose tab, change Proportion to Monospaced.

In the same Font Information window, select Lookups.
In the GSUB tab, and in the GPOS tab, select each line in turn and click Delete.

In the same Font Information window, click OK, and in the Change UniqueID? window that appears click Change.

If you want, you can tweak one or more questionable features of Fixedsys. E.g., the zero character is shifted one pixel to the right. To shift it back to center, double click on it, then click Metrics → Set LBearing..., set the LBearing to 10 and click OK. You can also change the shape of characters, but always keep control points at multiples of 10, and the width at 80.

Click Element → Bitmap Strikes Available..., then, in the window that appears set Pixel Sizes to 16 and click OK.

Click File → Generate Fonts..., choose a different directory and/or a different filename if needed, make sure the output format is TrueType, and click Save. In the Non-standard Em-Size window that appears click Yes. In the Errors detected window that appears next click Save (don't worry).

Quit FontForge (File → Quit). In the Font changed window that appears click Don't Save.


Move the generated file to the .fonts subdirectory of your home directory (create it if it doesn't exist).

Open the Gnome Terminal. Click Edit → Profiles... In a profile (I suggest you create a new one) change the font to Fixedsys Excelsior 3.01-L2 Mono (or whatever you have called the mono version of Fixedsys Excelsior), at size 12 (which is the only "true" Fixedsys size). If you want, you can also disable bold text. I suggest black text on white background, but that is a matter of taste.

The bold variant of this font is equivalent to repeating the character shifted by one pixel to the right (this is different from FSEX301-L2.ttf, where it appears smoothed). It is not very legible - but do you really need bold? I don't. The problem is only with those contexts where bold cannot be disabled (not even, e.g., by editing syntax highlighting), especially in those cases where the character spacing is incremented by one pixel as well, breaking alignments (this is not the case in gnome-terminal). I haven't found a solution to this last nuisance yet. Suggestions are welcome.


(*): not needed since the FontForge release of 2012-07-31 (in 14.04 LTS - Trusty Tahr)

3
  • To all who have saved and/or applied this recipe: please note that it may have slightly changed in the meanwhile in order to solve some small problems, and that it may still change in the future. You could have a look at the edit history. Nov 3, 2012 at 21:51
  • FYI, works fine on Windows, too. Also with "Fixedsys Excelsior 2.0" (which, in my opinion, is much better for terminals since the characters are a bit less high than in FSEX3). Great font for PuTTY! (the original FSEX and any font that is considered non-monospace makes PuTTY really slow when the screen refreshes very often) Dec 25, 2013 at 0:51
  • PhpStorm 7.1 on 14.04 does not recognize the font I describe in my answer as being a monospaced font, I don't know why :-( Luckily, if you uncheck "show only monospaced fonts", you can still get it. For some reason the size must be either 15 or 16 (they look the same) instead of 12. PhpStorm seems to be a bit buggy to me... Aug 24, 2014 at 23:07
3

Great solution by Walter Tross, but if you don't want to do all the job, here is the download link:

FixedsysExcelsiorIIIb-L2_Mono.ttf

2
  • 1
    Thanks Rafael, the "why" is in the second paragraph of my answer Jan 25, 2016 at 15:27
  • Ops! Sorry... Lack of attention... Fixed now.
    – Borjovsky
    Jan 25, 2016 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .