2015-07-10 125 views
2

如何建立字體摩納哥的大小上gvim?加粗文本 - gvim

: set guifont = Courier \ 14. 

如何讓這個字體爲粗體?

回答

1

在gVim的(不是終端VIM),你可以做:set guifont=*

它帶來了一個字體選擇對話框,您可以在其中選擇所需的字體系列,樣式和大小。之後,:set guifont?爲您提供了一個字符串,您可以在任何vimscript文件(如.gvimrc(帶有反斜槓的轉義空格\))中使用該字符串。

在我的Ubuntu盒子裏,如果我選擇摩納哥粗體:set guifont?輸出guifont=Monaco Bold所以輸入:set guifont=Monaco\ Bold給我粗體字體。

0

取自VimWikia,您可以傳遞參數來設置權重。在這種情況下,重量將是50,這是默認值。

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

的參數是按以下順序:

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)