Convert variable-width fonts to monospace
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Monospaci.Py is a Python script utilizing Fontforge, ttftable, and [ttfautohint] ( to scale ordinary variable-width fonts to fixed-width suitable for programming in IDE:s, text editors or terminal emulators.


Originally this script was created due to the authors favour of Serif:ed fonts and the general lack of such high quality Serif:ed fonts (there are like three of them[1]), and a bazillion of Monospace Sans fonts[2]. Thus this script became a biproduct of trying to making the venerable Computer Modern fit into a Terminal.


Lowercase letters are kept as-is (with the exceptions of m and w). Uppercase letters are re-scaled in width to fit the lower case ones. The re-scaling works somewhat, due to most text being lowercase, and most lowercase letters having the same width (with the notable exception of i,j,w, and m).


The kerning may get slightly off, but I haven't been bothered by this much, also uppercase letters can get quite badly scaled (note 'Q' in Garamond below, 'M', and 'W' may in some cases get too thin lines.


Some examples below, do note that the depicted fonts aren't available from here, but easily re-created from the linked Original sources:

C with JUnicode Mono

JUnicode, excellent for studying old languages. (Original)

.vimrc with Sniglet Mono

Sniglet Mono, when your vim needs more kittens. (Original)

C++ with EB Garamond Mono)

EB Garamond Mono, when your C++ isn't classy enough (Original)

Python with Fifth Leg Mono)

Fifth Leg Mono, thinking inside the box with Python (Original)

Java with Comic Sans MS Mono

Comic Sans MS Mono, really makes your Java pop!

JavaScript with Papyrus Mono

Papyrus Mono, give your JavaScript that antique look!

[1]: "Courier, Century SchoolBook Mono BT, and Verily Serif" [2]: "Too many to mention"