ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
52.6k stars 3.59k forks source link

Polybar: Some icons are offset from their center, others are too small #1443

Closed SolsticeSpectrum closed 7 months ago

SolsticeSpectrum commented 7 months ago

🗹 Requirements

🎯 Subject of the issue

Experienced behavior:

Using the glyphs in polybar is not a straight forward experience, some glyphs are smaller than others, some are offset When inspecting them with Font Manager, it is apparent that they are indeed offset One solution would be using Mono fonts but that makes all icons super tiny

Using Mono font makes the glyphs super tiny

Expected behavior: Icons should be centered and all icons should be same size

Example symbols:

These icons are offcenter: "", "", "", "", "", "", "", ""

Refresh icon - "" is smaller than poweroff icon - "" Some other examples of icons that are too small include: terminal: "" firefox: "󰈹" (this is not the one I use in polybar, I use "") spotify: ""

🔧 Your Setup

★ Screenshots (Optional)

Polybar: image image

Font Manager: image

Mono icons: image

SolsticeSpectrum commented 7 months ago

I should also point out, this wasn't an issue before v3

Finii commented 7 months ago

For Polybar I would expect that you use Inconsolata Nerd Font Propo. Is that the case? Unfortunately you do not specify the concrete font filename.

Finii commented 7 months ago

Compare

Edit: Add awesomeWM link, as I guess that is comparable

SolsticeSpectrum commented 7 months ago

For Polybar I would expect that you use Inconsolata Nerd Font Propo. Is that the case? Unfortunately you do not specify the concrete font filename.

I don't have any font called Propo installed. Can I get it on AUR?

SolsticeSpectrum commented 7 months ago

Actually I do

SolsticeSpectrum commented 7 months ago

YES PROPO FONT WORKS, OMG THANK YOU SO MUCH

However it doesn't solve the issue with some icons being small. I can solve that by using different icons for the time being tho

Finii commented 7 months ago

I'll have a quick look, unfortunately I have no Nerd Font installed :-D

image

Finii commented 7 months ago

image

The size of the icons originate from the original set. So comparable icons are often only found within the same set.

For example the 'refresh' you used is for weather indicators, where it fits nicely sizewise. image

Probably you should use the same set to get matching sizes, that means F011 and F01E? image

The dev set (you use dev-terminal) does have some imbalances, but in general is well balanced within itself:

image

Why spotify is smaller than firefox, I have no clue - both are in the font awesome set:

image


I remember we had the discussion to scale all icons to some same size, for example 1.6 cell width. I do not remember the details but the outcome was (obviously) to not-do it. I did put the code in, I remember that; and that it was more complex than anticipated. (Will edit this and add a link if I can find the thread. - Only found [1] which is related but not quite that.) Usually if you change some icons size because it is 'wrong' for one there will be two other that complain the new size is unbearable. :grimacing:

So what we do is Nerd Font Mono scales the icons down (never up, iirc) to fit into one cell, and the other Nerd Font and Nerd Font Propo do not touch the original icon sizes.

[1] Feature: Allow symbol scaling in nonmono (down to 2 'widths') https://github.com/ryanoasis/nerd-fonts/pull/748

Edit: Add link

github-actions[bot] commented 4 weeks ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.