Setting 2 fonts with different sizes in MacVim

2020-04-16 02:38发布

问题:

I'm using Vim in MacVim on Mac OS X. I have following config in .gvimrc:

set guifont=Inconsolata:h15

But I'd like to set to different font and font size for non-ASCII symbols (because Inconsolata didn't have russian symbols).

Problem is that Inconsolata id visually a lot smaller, than Monaco that I'd like to to use for russian characters.

In iTerm 2 I have following preferences:

  1. Regular font: 15px Inconsolata
  2. Non-ASCII Font: 12pt Monaco

I'd tried to use:

set guifont=Inconsolata:h15,Monaco:h12

But :h12 part didn't work (while Monaco part worked). Is there a way to fix it?

回答1:

You can have a look at :set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-*

From :h guifontset:

When not empty, specifies two (or more) fonts to be used. The first one for normal English, the second one for your special language. See |xfontset|



标签: vim macvim