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

[Bug] Ill-alignment of file type and saved/unsaved icons #474

Closed
3 tasks done
memeplex opened this issue Oct 8, 2021 · 5 comments
Closed
3 tasks done

[Bug] Ill-alignment of file type and saved/unsaved icons #474

memeplex opened this issue Oct 8, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@memeplex
Copy link
Contributor

memeplex commented Oct 8, 2021

Thank you for the bug report

  • I am using the latest version of doom-mode related packages.
  • I checked FAQ.
  • You may also try reproduce the issue using clean environment and minimal configurations with
    the command emacs -Q.

Bug description

image

Steps to reproduce

  1. Use the default doom-modeline settings
  2. Open a .txt file (other files will do it, but the issue is easier to spot comparing squared icons).
  3. Do some changes.

Expected behavior

Better vertical alignment, specially for two icons that are together.

OS

MacOS

Emacs Version

28

Emacs Configurations

Custom

Error callstack

No response

Anything else

No response

@memeplex memeplex added the bug Something isn't working label Oct 8, 2021
@memeplex
Copy link
Contributor Author

memeplex commented Oct 8, 2021

This is another case that looks terrible:

image

Maybe it's the file type icon the one to blame.

@memeplex memeplex changed the title [Bug] Ill-alignment of saved/unsaved icon [Bug] Ill-alignment of file type and saved/unsaved icons Oct 8, 2021
@seagle0128
Copy link
Owner

It's not possible to align all icons. doom-modeline leverages all-the-icons to display. You may need to file an issue for all-the-icons.

@memeplex
Copy link
Contributor Author

memeplex commented Oct 9, 2021

Indeed I'd already done that (see domtronn/all-the-icons.el#287) but it seems to be something else going on here. Please take a look at that report. I was experiencing a similar issue with company-box that I was able to work around by changing the default adjust/raise property of the fonts as suggested in all-the-icons documentation (I still believe that their default is not the best, but I'm waiting for their response). Anyway, that didn't change anything for doom-modeline so apparently there is something hardcoded somewhere.

@memeplex
Copy link
Contributor Author

memeplex commented Oct 9, 2021

Also, see how well aligned these two icons are:

image

There seems to be something specifically related to the alignment of the major mode icon.

@memeplex
Copy link
Contributor Author

I'm closing this, I've learnt the hard way how difficult it is to get all font icons properly aligned, I don't think it's worth the effort and would like to see a gradual move to svg icons, no only in doom-modeline but across the ecosystem, now that emacs is built with rsvg by default, IMO that will be a saner approach than the current mishmash of icons that are not only different sized but also not very well supported by emacs (for example, string-width often fails to compute the right width as described in #478 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants