7 Commits

Author SHA1 Message Date
Qwerasd
8b8e0bedad font: add scale groups to nerd font constraints
We do this by characterizing the shared bounding boxes in a static copy
of the symbols only nerd font when we're doing the codegen. This allows
us to get results of our scaling that are just as good as in a patched
font, since related glyphs can now be sized and positioned relative to
each other.
2025-07-08 12:00:22 -06:00
Qwerasd
c47459b4a2 font: add icon height to nerd font constraints
Icons were often WAY too big before because they were filling the whole
cell in height, which isn't great lol. This commit adds an `icon_height`
metric which is used to constrain glyphs that shouldn't be the size of
the entire cell.
2025-07-07 10:04:11 -06:00
Qwerasd
327caf903c font: fix nerd font patcher ypadding twice what it should be
The nerd font patcher uses `ypadding` as a single subtraction from the
cell height, which means that half of it should go to the top padding
and the other half to the bottom, this was making the heavy brackets way
too small lol (0.4 of the cell height instead of 0.7)
2025-07-06 17:20:39 -06:00
Qwerasd
c7e65b0c1c font: respect cell width attributes in nerd font constraints
This mostly applies to powerline glyphs, but is also relevant for heavy
bracket characters, which need to always be 1 wide otherwise they look
silly because they misalign depending on if there's a space after them
or not.
2025-07-06 11:23:49 -06:00
Qwerasd
8f989f6bfd font: fix nerd font codegen to handle ypadding properly
Previously `ypadding` was effectively ignored, since it's mutually
exclusive with `overlap`. This had a noticeable effect on the heavy
bracket characters U+276C...U+2771, which were much taller than they
should have been.

I also fixed the vertical overlap limit, since negative `overlap` values
are used in the nerd font attributes to create padding on all sides of
the cell, so we don't want to limit the magnitude of the overlap for
vertical padding, we only want to limit it if the value is positive.

That change fixed the vertical padding for a handful of ranges, which
should give more consistent results.
2025-07-06 11:02:00 -06:00
trag1c
4b6c461d6f refactor nerd font codegen script 2025-07-06 02:08:46 +02:00
Qwerasd
1775b75f2c font: generate glyph constraints based on nerd font patcher 2025-07-04 15:47:28 -06:00