4

I'm on Windows 7 with Vim 7.4, and Unicode symbols with the Hack font look awful. Am I missing a setting somewhere? Is there a way to improve this?

For reference, this is gvim:

gvim

and this is atom:

atom

I've also done the same with the Consolas font, and it's still bad.

This issue also exists in terminal vim, but it is slightly better.

6

If you have a recent Vim, you may try to enable DirectX rendering. It should improve "wide" font rendering, among other things. Here's an example vimrc snip:

if has("gui_running")
    set guioptions=icpM
    if has('win32') || has('win64')
        if (v:version == 704 && has("patch393")) || v:version > 704
            set renderoptions=type:directx,level:0.75,gamma:1.25,contrast:0.25,
                        \geom:1,renmode:5,taamode:1
        endif
endif

Reference :h rop


Some other remarks, more generic, which may or may not be useful in your case:

Font spacing (horizontal, vertical) sometimes is not the same between Linux, Mac and Windows (in Vim, but also happens with other apps, e.g. Emacs). You can tweak those using set linespace=... (vertical) and, (only) if you use Kaoriya's gVim build, set charspace=... (horizontal). This may indirectly improve font appearance.

  • 1
    Interesting. Well, it looks MUCH better now. – afontaine Feb 7 '16 at 19:32
  • Unfortunately, for me setting renderoptions=type:directx has a big performance impact. – porges Feb 2 '17 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.