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

Icons not aligned #77

Open
troglotit opened this issue Jul 21, 2017 · 11 comments
Open

Icons not aligned #77

troglotit opened this issue Jul 21, 2017 · 11 comments

Comments

@troglotit
Copy link
Contributor

troglotit commented Jul 21, 2017

image
image

I read #33 and related commit. Tab symbol aligns but for a whole symbol 😂. Not sure if fixable. Thought that should raise an issue in case you didn't know. Btw, I'm using Fira Code fonts

@domtronn
Copy link
Owner

Hey @troglotit! I have been playing around with the icon sizes and things, so it's very possible I broke it! 😅

I'll have a look into this, should be able to fix it by tweaking the values. 👍

@domtronn
Copy link
Owner

However, could you please tell me the value tab-width inside the Neotree buffer please? 🙂

@troglotit
Copy link
Contributor Author

tab-width is a variable defined in ‘C source code’.
Its value is 1
Original value was 8
Local in buffer  *NeoTree*; global value is 2

@stardiviner
Copy link
Contributor

all-the-icons not-aligned icons
I have the same issue. Check out the screenshot.

@domtronn
Copy link
Owner

Hmm.. I'm not sure if there's anything to be done really... Unfortunately, the problem is that some of the icon fonts aren't fixed width so it messes with alignment.

The best thing to do is use tabs as much as possible (as these line up, but getting the width of them right can be tricky) or modifying the height of the icons. You can do the latter by calling

(all-the-icons-icon-for-file "foo.txt" :height 1.2) ;; For file matching
(all-the-icons-faicon "icon-name" :height 1.2) ;; For a specific icon from a specific set

Sorry there's not really more I can do!

@stardiviner
Copy link
Contributor

@domtronn Use property :height did fixed my problem. Thanks.

@jsmestad
Copy link
Contributor

Is this still the most elegant solution?

@stardiviner
Copy link
Contributor

I think yes.

@wyuenho
Copy link
Collaborator

wyuenho commented Feb 23, 2019

There are quite a number of these misalignment issues. I'm considering using the SVG sources of these fonts, render the SVGs instead of using icon fonts. The trade off will be that if you've merged the icon fonts into your own font to get all-the-icons working on a term, it will stop working. You may also have to readjust some of your current alignments. If your Emacs wasn't compiled with SVG, it will also not work.

@Alhadis
Copy link

Alhadis commented Apr 8, 2019

Anything you want me to do upstream with file-icons? Each icon was fit to a maximum aspect ratio of 1.0 (square) or narrower, for admittedly pedantic reasons that only make sense when the icons are rendered using HTML and CSS.

However, I"m beginning to regret that decision, as I've noticed file-icons being used in many environments where authors and users have no fine-grained control over icon widths, even in an HTML-based environment.

@e-denny
Copy link

e-denny commented Jan 13, 2020

Can the fonts be transformed so that they are made to be monospaced using something like https://github.com/cpitclaudel/monospacifier ? It's using fontforge to make the transformations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants