Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for displaying nerd font icons in full width with the mono variants #285

Open
wsx-udscbt opened this issue Jan 16, 2024 · 7 comments

Comments

@wsx-udscbt
Copy link

Glad to see nerd font icons are added natively in 0.830, and those icons are scaled down to fit the width constraint of the mono variants.
Although I understand the logic behind this decision, they are still visually unpleasant in many cases and leads to confusions like #274.

Related to this issue, I notice the kitty terminal has implemented a nice technique here.
Using the snowflake emoji as an example, when showing by itself as , a strictly half-width glyph is used, and when followed by a space , a full-width glyph is displayed.
I think a similar trick can be implemented in PragmataPro Mono Liga using ligature (?) to show nerd font icons as half-width by default, and display their full-width version when followed by a space.
I would argue that this works well visually in almost all cases, and solves the problem without introducing yet another PragmataPro Mono variant but with full-width icons.
That said, I have no idea how feasible can this be implemented on the font level.

@fabrizioschiavi
Copy link
Owner

This is a very good idea! I think it solves brillantly this "micro-icons" issue.
Do you think can interfer with some other IDE settings?

@wsx-udscbt
Copy link
Author

Thanks for the quick reply!

Do you think can interfer with some other IDE settings?

Not that I can think of, although I don't use PragmataPro normally in an IDE.
And I believe those nerd font icons have little use in most IDEs, where the GUI can simply draw those icons natively.

On the topic of full-width icons, maybe this is also a good chance to tune their sizing and spacing a bit.
For example, I find the desktop icon ( U+F108) slightly oversized (not much side bearings) compared to the folder icon ( U+EA83).
Is there an automated way to scale those icons to achieve comfortable and consistent side bearings/sizes, or they have to be tuned on a case-by-case basis manually?

@fabrizioschiavi
Copy link
Owner

You've right, at least the width of these icons must be constistent.
Unfortunately they have to be tuned on a case-by-case basis manually…
The design of all these 9,236 Nerd icons comes from the ufficial Nerd repo.
I'll do my best to improve the consistency of these icons.

@net
Copy link

net commented Sep 11, 2024

This solution is clever, but personally I would rather just have the full-width icons in PragmataPro Mono. I don't want to use the rest of the ligatures, and the condensed icons are simply too small to be usable.

Alternatively, perhaps the ligature full-width icons could be added to PragmataPro Mono, still keeping PragmataPro Mono Liga separate for those who want the full set of ligatures.

@ahmedelgabri
Copy link

ahmedelgabri commented Sep 16, 2024

I came here to open an issue about this, but I found that my issue was referenced from the Kitty terminal repo, my way to solve this was adding an extra space and use PragmataPro Liga but since 0.36.0 this workaround doesn't work anymore because Kitty became more strict and it won't even use any font that's not a fixed width font.

So now I had to go back to PragmataPro Mono Liga + the embedded Nerd Font with Kitty to be able to get decent sized icons (they are not great TBH sometimes they are too large compared to text to them) so it will be great if this can be fixed inside the font itself.

@rafi
Copy link

rafi commented Dec 14, 2024

@ahmedelgabri my workaround is to override the nerd symbols map range to a different font.

@ahmedelgabri
Copy link

@rafi that's what I'm doing now too. But this only works in Kitty, If you use a different terminal this might not work. Plus you are using two fonts now with different characteristics. I think it's better if the issue is fixed at the font level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

5 participants