After working with SomeType Mono for a little while, I decided to quantify my font ratings.
I started by dusting off my old fontforge svg2ttf script, since I knew its Python API exposed everything I needed. Then I discovered that I can’t get that API to work any more. Somewhere between the Python 2->3 updates and Homebrew’s descent into madness, it done broke.
I know how to extract metrics and outlines using Font::FreeType
and
Cairo
in Perl, and most of what I need is already exposed in my
PDF::Cairo
module, but I’d have had to do some mucking about with
internals to get it all, and it would have added a messy dependency
should I decide to share the script.
So I switched to Adobe Font
Toolkit, which cleanly
installs into a Python virtualenv without any issues. Its tx
utility
can both extract metadata and calculate precise bounding boxes for
every glyph, which allows me to measure many of my concerns:
FONT OfficeCodePro-Regular.otf
x-height 69.012% of ascender height
relative width 100.000%
vertical centering offset from '=':
! greater -3.79%
! less -3.79%
! parenleft -7.04%
! parenright -7.04%
! bracketleft -7.04%
! bracketright -7.04%
! braceleft -7.04%
! braceright -7.04%
! bar -10.83%
width compared to '=':
! asciitilde +4.19%
This tells me that Office Code Pro has a standard typewriter width
(Courier, Prestige Elite, etc), a decent x-height, equal widths for
-=+
, a slightly-wide ~
, common vertical centering for =-+~*&#%/\
and digits, a very small vertical offset for <>
, a bigger one for
()[]{}
, and an annoyingly large one for |
. Since I’m not analyzing
the glyph outlines yet, I can’t tell that it has a five-lobed
asterisk and a slashed zero.
For comparison, here’s the latest release of Iosevka Fixed SS02 Regular:
FONT iosevka-fixed-ss02-regular.ttf
x-height 69.829% of ascender height
relative width 83.333%
vertical centering offset from '=':
! asciitilde -2.11%
! ampersand +3.62%
! percent +3.62%
! zero +3.62%
! X +3.62%
width compared to '=':
! asciitilde +19.47%
Similar x-height, much narrower, &%
aligned with caps/numerals, and
twiddle a hair low and extra-wide.
The last time I looked at Iosevka, all the “SSnn” variants were built with the same family name, so you couldn’t tell which of the sixteen variations you’d downloaded except by the file name. They’ve cleaned things up quite a bit, and now it’s fully scriptable so you can roll your own variation and Have It Your Way. The downside is that the repo is over 5 gigabytes. The other downside is that it uses npm.
Other fonts I’ve tried recently? IBM Plex
Mono (painfully short hyphen, dotted
zero, goofy #
), Cascadia
Mono (the dotted zero and
goofy alphabet clobber its otherwise perfect score, although I’d use
Light rather than Regular), Go
Mono
(five-lobed goofy asterisk, serifs, and inconsistent punctuation
weight), JetBrains Mono
NL (dotted zero,
five-lobed asterisk, small-but-consistent vertical offsets for
()[]{}/\|~*
), and Code Saver
(short hyphen, high /\
, low |
).
Oh, and the name of my script? Termanal. If I ever roll my own custom font, obviously I’ll call it Termanal Regular. 😁
Just found the current much-expanded version of the
Inconsolata family.
Slashed zero, ligatures off by default, five-lobed asterisk,
annoyingly short hyphen, slightly-low []
, annoyingly low |
,
eight weights, and nine widths (166%, 125%, 100%, 92%, 83%, 75%,
67%, 58%, and 42% for when you need all the columns).
Markdown formatting and simple HTML accepted.
Sometimes you have to double-click to enter text in the form (interaction between Isso and Bootstrap?). Tab is more reliable.