2

How to establish a font Monaco of size 10 on gvim?

: set guifont = Courier \ 14.

How to make this font is bold?

Sagar Jain
  • 7,475
  • 12
  • 47
  • 83
Hooli
  • 37
  • 1
  • 8

2 Answers2

1

On gVim (not terminal Vim) you can do :set guifont=*.

It brings a font selection dialog where you can choose desired font family, style and size. After that :set guifont? gives you a string which you can use in any vimscript file like .gvimrc (escape spaces with backslash \).

On my Ubuntu box if I choose Monaco Bold :set guifont? outputs guifont=Monaco Bold so entering :set guifont=Monaco\ Bold give me the bold font.

Ves
  • 1,212
  • 1
  • 9
  • 19
0

Taken from VimWikia, you can pass parameters to set the weight. In this case the weight would be 50, which is default.

set guifont=Courier\ New/11/-1/5/50/0/0/0/1/0

The parameters are in the following order:

font family (in this example, "Courier New")
point size (default = 10)
pixel size (-1 = default)
style hint (what to do if requested family can't be found; 5 = AnyStyle = default)
weight (50 = normal, 25 = light, 63 = semibold, 75 = bold, 87 = black)
italic (0 = no)
underline (0 = no)
strikeout (0 = no)
fixedPitch (1 = yes)
raw (0 = no)
Guy
  • 10,931
  • 5
  • 36
  • 47