Open Source Terminal Font Iosevka

Posted Tuesday, March 15, 2022 by Sri.Tagged MEMO
EDIT STATUS:new

Iosevka is a beautiful console font with variations of characters you can pick. It's a kit to make your perfect terminal font!

Customizing Your Build

Prequisities: You'll need NodeJS 14.0+ installed. Also, the library ttfautohint has to be installed and available from your command line environment. On MacOS I used homebrew to brew install ttfautohint.

You can build your own custom binary by cloning the package from GitHub, but to avoid pulling 2+ gigabytes of history use the --depth option:

git clone --depth 1 git@github.com:be5invis/Iosevka.git

Then edit private-build-plans.toml. Use the online configuration tool to generate the contents of the TOML file. That page also has the commands you need to run to build the fonts.

Here's my current build file private-build-plans.toml

[buildPlans.iosevka-web]
family = "Iosevka"
spacing = "fixed"
serifs = "sans"
no-cv-ss = true
no-ligation = true

[buildPlans.iosevka-web.widths.normal]
shape = 600
menu = 5
css = "normal"

[buildPlans.iosevka-web.weights.regular]
shape = 400
menu = 400
css = 400

[buildPlans.iosevka-web.weights.bold]
shape = 700
menu = 700
css = 700

[buildPlans.iosevka-web.slopes.upright]
angle = 0
shape = "upright"
menu = "upright"
css = "normal"

It creates a build plan called "iosevka-web" that creates font family Iosevka Web (the builder adds the "Web" part).

  • Top chunk sets the base styles. I'm using "fixed" spacing which is good for code indenting. No ligatures to keep size down (and also because I don't like them in code)

  • The next chunk defines what the 'normal' width should be, and was set as choosing "extended as normal" from the customizer. The font is too narrow otherwise to look good on my website imho.

  • The next two establish what weights I want, and what they map to in CSS weights/OS weights. Limiting these keeps the fonts smaller.

  • I'm not sure what the last one is doing. Maybe it sets the default "normal" to use the upright (non-oblique, non-italic) shape.

To build just the webfonts, I run:

npm run build -- webfont::iosevka-web

The fonts are then availble in dist/