raphamorim / rio

A hardware-accelerated GPU terminal emulator focusing to run in desktops and browsers.
https://raphamorim.io/rio
MIT License
3.67k stars 116 forks source link

Provide Rio's own powerline symbols #448

Open mhartington opened 9 months ago

mhartington commented 9 months ago

With my rio config, I set the line height at 1.5 so it's a bit easier to read. With that set, though, certain powerline gylphs end up looking too small for the allotted space.

<img width="429" alt="Screenshot 2024-02-05 at 9 39 20 AM" src="https://github.com/raphamorim/rio/assets/2835826/2f06a389-f897-4795-b757-ba84084afa2b">

This is to be expected, though, since the line height doesn't actually modify the font. In iterm, they provide an option to deal with this, where powerline glyphs can be swapped for internal one. These internal powerline glyphs will match the line height and look correct, regardless of what the user sets.

Screenshot 2024-02-05 at 9 44 26 AM

And in action, you can see the swap between the glyphs my font provides, and the built-in ones.

https://github.com/raphamorim/rio/assets/2835826/94e453fa-fdf5-4195-8ee2-5b3a2d732bf8

raphamorim commented 8 months ago

Hey there @mhartington thanks for the issue, sorry about delay to reply.

This is to be expected, though, since the line height doesn't actually modify the font. In iterm, they provide an option to deal with this, where powerline glyphs can be swapped for internal one. These internal powerline glyphs will match the line height and look correct, regardless of what the user sets.

Yes I was going to say this. Thanks for sharing about the iTerm2 solution, I didn't know that. Currently I am working in a major rewrite of the renderer to support a decent line-height calculation (#428) but probably it will not fix this issue either. Then I wonder what might be the best fix for this case, thinking in allow scale certain glyphs via configuration (in this case the powerline icons) to match the line or a specific size.