macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.55k stars 683 forks source link

user fonts do not appear in :set guifont=* #371

Open jsholmes opened 8 years ago

jsholmes commented 8 years ago

Fonts I've installed (e.g.: DejaVu Sans Mono for Powerline) do not appear in :set guifont=*

These fonts work fine in iterm2 when using vim, neovim, etc.

This worked before I upgraded to 8.0.

achimnol commented 8 years ago

I have similar issues, too.

When I open a new vim window from MacVim's menu (Cmd+N), my guifont setting is applied well, but sometimes fails upon several restarts of the MacVim app. When I open a new vim window from mvim script in a shell, my guifont settings is NOT applied. When I open a new tab from mvim script to an existing window opened with Cmd+N, my guifont settings is kept applied in the new tab if guifont has worked for that window.

When guifont settings is not applied, sometimes choosing another font in the font window opened by :set guifont=* does not work, but sometimes it does work.

My vimrc says:

" MacVim-specific options
if has("gui_macvim")
  colorscheme glacier
  set guifont=Menlo\ for\ Powerline:h12
  set transparency=0
endif

I tried to disable Vundle and all my plugins using -Z (restricted mode) and --noplugin from the command line, but had no luck.

achimnol commented 8 years ago

I finally figured out how to fix (workaround) my problem: use reattach-to-user-namespace when opening the shell (set in iTerm profile) and tmux. This seems to be a problem in loading fonts installed in user's home directory (~/Library/Fonts instead of /Library/Fonts).

achimnol commented 8 years ago

@jsholmes: your problem may be due to upgrade to macOS Sierra, not MacVim 8.0, according to this. I suspect this because macOS Sierra and MacVim 8.0 snapshot release dates are very close (Sep 20th vs. Sep 14th).

eirnym commented 5 years ago

I see all fonts installed if they are monospaced.

Droid Mono is not really monospaced font