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

vertically stretched icons #37

Closed
skcc321 opened this issue Sep 27, 2015 · 13 comments
Closed

vertically stretched icons #37

skcc321 opened this issue Sep 27, 2015 · 13 comments

Comments

@skcc321
Copy link

skcc321 commented Sep 27, 2015

Hi there.
What shall I do to fix 'stretching' effect?
example:
alt text
emulator: gnome terminal
font: droid sans mono for powerline plus nerd file types mono 12

Also, I will be very grateful if someone describe how to patch default ubuntu mono font. :)

@ryanoasis
Copy link
Owner

This is a known problem and actually I am not sure the best way to make the mono sized glyphs appear big enough without some stretching.


In gnome terminal you should be able to use one of the double-width glyph fonts (they won't appear stretched) instead of the true Mono ones.

For example use Ubuntu Mono Plus Nerd File Types.ttf instead of Ubuntu Mono Plus Nerd File Types Mono.ttf. They are both Mono the only difference is that the former has some double width glyphs.


As for patching your own it should be as simple as:

./font-patcher PATH_TO_FONT

@skcc321
Copy link
Author

skcc321 commented Sep 29, 2015

Thx a lot :)

@MadsRC
Copy link

MadsRC commented Feb 3, 2016

I am experiencing the same thing with my Arch Linux, URxvt, vim+nerdtree and vim-devicons. Font is Sauce Code Pro Complete Mono.

Actually also happens in the i3statusbar, using the same font.

@heyjordn
Copy link

Experienced the same problem
Arch Linux: 4.4.1
Wm: dwm
Font: Hurmit Medium Complete

Repatching the font without the --use-single-width-glyphs or -s flag fixed the problem. (In vim as well as statusbar)
status
vim

@ryanoasis
Copy link
Owner

@MadsRC @pr0x1m4 Thanks for the info.

Unfortunately it is a limitation of the script and my knowledge of how to best fix it. The only current alternative as @pr0x1m4 mentioned is to not use the single width glyph version of the font (basically a font name that doesn't end in 'mono'). This also is a WIP to be cleared up (which font do I even want?)

@s0r00t
Copy link

s0r00t commented May 21, 2016

Having same troubles with gVim + patched Hack Regular from the repo. Arch x64 here.
When I'm using the Mono variant as guifont, this happens :
Stretched

And when I'm using the non-Mono variant, glyphs are cut in two :
Cut

Weird enough, if I'm pasting long lines of commands in the prompt (ex: let g:WebDevIconsUnicodeGlyphDoubleWidth = 1), the icons are fixed :
Fix

@s0r00t
Copy link

s0r00t commented May 21, 2016

I just discovered that changing workspaces in i3wm fixes the cut icons... Weird.

@UFOwl
Copy link

UFOwl commented Jun 2, 2016

Same thing with Windows 10 gVim.

I download both Mono Windows Compatible and Windows Compatible (without Mono) version, and open them with FontCreator. It seems that icons in former one are half the width of the latter, which making them look 'streched'. However, only the former (Mono version) can be recognized by gVim... :(

Finally I replace the icons in Mono version with that of the other using FontCreator (just copy and paste), export as a new font, set the new font as guifont in _vimrc and the problem is solved :)
20160603023555

Hope this helps.

@ryanoasis
Copy link
Owner

Nice solution/idea 😄

Not sure why it would not work in gvim however

@UFOwl
Copy link

UFOwl commented Jun 3, 2016

The problem (font without Mono suffix can't be recognized by gvim) seems font-specific. DejaVuSansMono suffers from it while FiraCode doesn't. Today I try Fura Code Regular Nerd Font Complete Windows Compatible (without Mono) and the font successfully shows up in the Select Font... menu of gvim, which saves me from modifying it manually:)

@ryanoasis
Copy link
Owner

The stretching at least should now be fixed in 0.9.0 branch.. if anyone would like to try it out

@ryanoasis
Copy link
Owner

since v1.0.0 release this is fixed

@github-actions
Copy link
Contributor

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 Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants