Another banger font PR from Qwerasd. Ghostty now parses the Nerd font patcher to map the constraints into Zig, then applies them dynamically for your grid size, so Nerd font symbols appear perfect regardless of font. Also our binary size went down by 20%. https://github.com/ghostty-org/ghostty/pull/7809
The difference is subtle in the image but the end result is that glyphs are properly aligned within the grid, and for varying font faces they're going to look much better (for unpatched fonts). Most importantly: you don't need to patch your fonts anymore*.
For us as maintainers, it also means that we can very easily update to new Nerd font versions to get you all the latest symbols in releases.
Ghostty has always shipped with nerd font symbols in case you don't have a patched font but we always fell back to the JetBrainsMono patched font symbols which meant that they may not look quite right depending on the grid defined by your actual font. Now we adjust it dynamically for your real font.
This is some amazing work. The font patcher is a python script that does math in some cases to figure out the constraints, it's not just a data table. So we actually use another Python script with the `ast` package to parse the patcher, then `eval` some of the loops in order to extract our own data table (we do this once and commit the result into the source tree). Also... AI vibe coded most of that for us because its tedious as hell.
This is the first time I've seen any software do anything like this, and it's really damn cool.
(* note on patching: our runtime constraints aren't completely identical to the Nerd font patcher but produce very good results. It's definitely a massive improvement for unpatched fonts. Patched fonts will still produce slightly more consistent results but I would argue it isn't necessary in practice.)