iosevka build plan

Iosevka (repository) is a great monospace font with a convenient build system. We were shipping a rather large file (well over 1 MB per variant) on this website that contained plenty of glyphs we absolutely did not need. By writing a short build plan, we managed to cut it down to ≈60 kB per variant. We’re saving it here, because it will disappear from our disk at some point otherwise.

[buildPlans.IosevkaCustom]
family = "Iosevka Custom"
spacing = "term"
serifs = "sans"
noCvSs = true
exportGlyphNames = false
webfontFormats = ["WOFF2"]

[buildPlans.IosevkaCustom.ligations]
inherits = "dlig"
enables = ["eqslasheq", "slasheq", "tildeeq"]

[buildPlans.IosevkaCustom.weights.Regular]
shape = 400
menu = 400
css = 400

[buildPlans.IosevkaCustom.weights.Bold]
shape = 700
menu = 700
css = 700

[buildPlans.IosevkaCustom.slopes.Upright]
angle = 0
shape = "upright"
menu = "upright"
css = "normal"

[buildPlans.IosevkaCustom.slopes.Italic]
angle = 9.4
shape = "italic"
menu = "italic"
css = "italic"

[buildPlans.IosevkaCustom.subset.include]
ranges = [
    [  32,  126], # basic latin
    [ 160,  255], # latin 1 supplement
    [8192, 8292], # general punctuation
    [8304, 8348], # superscripts and subscripts
    [8592, 8703], # arrows
    [9216, 9257], # control pictures
    [9472, 9599], # box drawing
]

Note that our subset selection was absolutely not scientific. We just scrolled the Iosevka Specimen and chose whole blocks we thought might be useful in code blocks. If we wanted to optimize further, we could probably remove some of those blocks. If we wanted to go even further, we could choose specific characters (or worse, automate subsetting based on exactly what characters the site uses at build time).