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

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

Closed
3 tasks done
SolsticeSpectrum opened this issue Nov 28, 2023 · 9 comments
Closed
3 tasks done

Comments

@SolsticeSpectrum
Copy link

🗹 Requirements

  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have searched the FAQ for help
  • I have searched the Wiki for help

🎯 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

  • Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?
    • Inconsolata Nerd Font
  • Where did you get the file from (download link, self patched, source downloaded from link...)
  • Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)?
    • kitty
  • Are you using OS X, Linux or Windows? And which specific version or distribution?
    • Arch Linux

★ Screenshots (Optional)

Polybar:
image
image

Font Manager:
image

Mono icons:
image

@SolsticeSpectrum
Copy link
Author

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

@Finii
Copy link
Collaborator

Finii commented Nov 28, 2023

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
Copy link
Collaborator

Finii commented Nov 28, 2023

@Finii Finii changed the title Some icons are offset from their center, others are too small Polybar: Some icons are offset from their center, others are too small Nov 28, 2023
@SolsticeSpectrum
Copy link
Author

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
Copy link
Author

Actually I do

@SolsticeSpectrum
Copy link
Author

SolsticeSpectrum commented Nov 28, 2023

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
Copy link
Collaborator

Finii commented Nov 28, 2023

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

image

@Finii
Copy link
Collaborator

Finii commented Nov 28, 2023

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. 😬

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') #748

Edit: Add link

@Finii Finii closed this as completed Nov 28, 2023
Copy link
Contributor

github-actions bot commented Jun 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants