Inspired by Michael Bommarito’s post, I’m just dropping some quick notes on getting Berkeley Mono Variable (TX-02) to work in Ghostty.
Specifically, Berkeley Mono 2.002, released on 2024-12-31, running in Ghostty 1.1.3-arch1.
Using the variable version of the font is highly convenient: it is very fast to change styles and tweak things until it is exactly how you like it, without having to iterate with installing static fonts.
I suggest you read his post first for lots of nice context on fonts and their features.
Then, the key bit of information I needed to get this working was the following. TX-02, the updated version of Berkeley Mono, has different OpenType features than the original. There is no documentation I could find on exactly what they mean, but via some trial and error, I’ve landed on the following config.
font-family = "Berkeley Mono Variable"
# Font width (60 to 100)
# 60 = UltraCondensed
# 70 = ExtraCondensed
# 80 = Condensed
# 90 = SemiCondensed
# 100 = Normal
font-variation = wdth=90
# Font weight (100 to 900)
# 100 = Thin
# 200 = ExtraLight
# 300 = Light
# 350 = SemiLight
# 400 = Regular
# 500 = Medium
# 600 = SemiBold
# 700 = Bold
# 800 = ExtraBold
# 900 = Black
font-variation = wght=400
# Font slant (0 to -16)
# 0 = Regular
# -16 = Oblique
font-variation = slnt=0
# otfinfo -f ~/.local/share/fonts/Berkeley\ Mono\ Variable.otf
# aalt Access All Alternates
# calt Contextual Alternates
# ccmp Glyph Composition/Decomposition
# mark Mark Positioning
# mkmk Mark to Mark Positioning
# salt Stylistic Alternates
# ss01 Stylistic Set 1 <- slashed 0
# ss02 Stylistic Set 2 <- dotted 0
# ss03 Stylistic Set 3 <- gap 0
# ss04 Stylistic Set 4 <- slashed 0, slash 7
# ss05 Stylistic Set 5 <- dotted 0, slash 7
# ss06 Stylistic Set 6 <- gap 0, slash 7
font-feature = +calt
font-feature = +ss02
font-size = 13
# Personal preference
adjust-cell-height = -2%
Specifically, I found that aalt and salt appear to change what the stylistic sets do (to different things than my comments).
ccmp, mark, and mkmk don’t do anything that I noticed.
So, effectively, it seems to me that the only two features you actually care about are your font-variation settings, and then whether you want ligatures with calt, and what style of 0/7 you want via stylistic sets.
Another tip: if you have static versions of Berkeley Mono installed, I noticed that that sometimes breaks Ghostty from loading Berkeley Mono Variable. I’m unsure why, but I was able to resolve it by removing the static fonts, configuring things, and then putting them back.