55

I would like to have a font with all characters the same width.

For example, a W is wider than an i in most fonts ...Is there any font that has all characters equally wide?

4
  • 14
    There are too many to list. Simply search for "monospaced", "fixed-width", or "non-proportional" font, and you would be able to find many examples. Commented Dec 4, 2012 at 5:41
  • o..Thz..I don't know the keyword: monospaced
    – Ted Wong
    Commented Dec 4, 2012 at 6:20
  • 15
    Fun fact - the code button you used to highlight the "W" and "i" in your question switches to a monospaced font... so the W and i right there in your question are in a font that is making them have the same width :) Look at the CSS for it using inspect element in your browser and in 'font-family' you get a big long list of monospaced fonts: Droid Sans Mono',Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif Commented Dec 5, 2012 at 2:23
  • Such fonts are also called "fixed-pitched fonts" apart from the listed names by @AnandaMahto. Commented Jul 1, 2018 at 7:23

3 Answers 3

59

What to search for

The type style you're looking for is monospace. Wikipedia explains it well.

A monospaced font, also called a fixed-pitch, fixed-width, or non-proportional font, is a font whose letters and characters each occupy the same amount of horizontal space. [...]

Examples of monospaced fonts include Courier, Courier New, Lucida Console, Monaco, and Consolas. [...]

Ubiquitous options

These days, just about every computer has one or both of these fonts:

Consolas

Courier

0
21

Fonts have 2 characteristics that will affect character spacing: width and kerning. Kerning determines when two adjacent characters can overlap. For instance, when you write AT, the leftmost part of the T bar may actually be positioned LEFT of the lowest part of the right branch of the A. Although fixed width fonts may allow kerning, it is rarely the case.

Anyway, if you want to choose a fixed-width font, you can use the following text

  • IIIIIIIIII
  • HHHHHHHHHH
  • AAAAATTTTT
  • ATATATATAT

and look at the appearance using various fonts. If the first 2 lines have the same length, then it is fixed width. If the last 2 lines have the same length, then there is no kerning. I.e., you want all 4 lines to have the same length.

In Microsoft Word 2007 on Windows, the following fonts seem to be fixed-length, no kerning:

  • BatangChe
  • Consolas
  • Courier New
  • DFKai-SB
  • DotunChe
  • GulimChe
  • GungSahChe
  • KaiTi
  • Lucida Console
  • MingLiU
  • MS Gothic
  • MS MinChe
  • NSimSun
  • SimHei
  • Simplified Arabic Fixed
  • SimSun
  • SimSun-ExtB
1
  • Do you have a list of proportional fonts that don't have kerning? I find it difficult to locate such fonts, but I want to test with them... Commented Sep 21, 2023 at 23:03
2

xlsfonts supplies information about fonts when the X Windows System is in use (commonly on Linux or similar systems; almost never on MSWindows). Its -l and -m options display several font metrics, including minimum character width and maximum character width. Using shell commands, one can compare those widths to detect fixed-width fonts. For example, xlsfonts -lm '*fang*' gives

  DIR  MIN  MAX EXIST DFLT PROP ASC DESC NAME
  --> * 33 *119  some 8481   25  10    1 -isas-fangsong ti-medium-r-normal--0-0-72-72-c-0-gb2312.1980-0
       min(l,r,w,a,d) = (0,12,12,11,2)
       max(l,r,w,a,d) = (0,12,12,11,2)
  --> * 33 *119  some 8481   21  14    2 -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
       min(l,r,w,a,d) = ( 0, 0,16, 0,-13)
       max(l,r,w,a,d) = (12,16,16,14,  2)

For both those fonts, the min w equals the max w value – 12, 12 for one, 16, 16 for the other – indicating both are fixed-width fonts. (Note, xlsfonts source code includes similar checks.)

From a recent post of mine on usenet, here is a Python program checkFixed.py that automates the comparison. It reads xlsfonts-style data lines from stdin, compares w values, and prints results on stdout when min w equals max w. (Of course similar programs could be written in awk, perl, etc.)

 #!/usr/bin/env python
 # jiw - 2016
 # This program reads `xlsfonts -lm`-style lines from stdin, and tests
 # for cases where the w elements of min and max tuples are the same
 from sys import stdout
 while True:
     try:
         r = raw_input()
         if r[0] == '-':         # Font-lines start with -->
             m1 = int((raw_input().split(','))[6])
             m2 = int((raw_input().split(','))[6]) 
             if m1==m2:
                 print r
                 stdout.flush()
     except:
         break

For example, xlsfonts -ml | ./checkFixed.py | head -3 on my system printed out

 -->    0  255  some    0   29  14    5 -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-adobe-standard
 -->    0  255  some    0   29  15    5 -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-ascii-0
 --> *  0 *255  some    0   29  15    5 -bitstream-courier 10 pitch-bold-i-normal--0-0-0-0-m-0-iso10646-1

In another example, xlsfonts -ml '*fixed*' | ./checkFixed.py | head -3 printed out

 --> * 33 *116  some 8481   25  11    1 -jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0
 --> * 33 *116  some 8481   21  14    2 -jis-fixed-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0
 --> * 33 *116  some 8481   21  14    2 -jis-fixed-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0
2
  • Thanks for the contribution and welcome to GraphicDesign! Commented Apr 14, 2016 at 18:35
  • Does this work on Wayland? Commented Sep 8 at 12:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.