On Aug 19, 8:43 am, cyboman <[email protected]> wrote: > > if has("gui_running") > " check and determine the gui font after GUIEnter. > " NOTE: getfontname function only works after GUIEnter. > au GUIEnter * call s:SetGuiFont() > endif > " set guifont > function s:SetGuiFont() > if has("gui_gtk2") > set guifont=Luxi\ Mono\ 10 > elseif has("x11") > " Also for GTK 1 > set guifont=*-lucidatypewriter-medium-r-normal-*-*-180-*-*-m-*- > * > elseif has("mac") > if getfontname( "Bitstream_Vera_Sans_Mono" ) != "" > set guifont=Bitstream\ Vera\ Sans\ Mono:h13 > elseif getfontname( "DejaVu\ Sans\ Mono" ) != "" > set guifont=DejaVu\ Sans\ Mono:h13 > endif > elseif has("gui_win32") > let font_name = "" > if getfontname( "Bitstream_Vera_Sans_Mono" ) != "" > set guifont=Bitstream_Vera_Sans_Mono:h10:cANSI > let font_name = "Bitstream_Vera_Sans_Mono" > elseif getfontname( "Consolas" ) != "" > set guifont=Consolas:h11:cANSI " this is the default > visual studio font > let font_name = "Consolas" > else > set guifont=Lucida_Console:h10:cANSI > let font_name = "Lucida_Console" > endif > silent exec "nnoremap <unique> <M-F1> :set > guifont=".font_name.":h11:cANSI<CR>" > endif > endfunction
I'm glad you found the answer. You can probably work around this by adding your own GUIEnter autocmd in an after/plugin directory or something, if you haven't already found a workaround. The function is somewhat strange in one point to me. If I understand correctly, DejaVu fonts are mostly a superset of Bitstream Vera fonts, so I'm confused why the script would prefer Bitstream Vera over DejaVu. I'm also confused why it doesn't check for DejaVu on Windows, that's my chosen font on Windows (and on Linux actually) and is readily available. You might file a bug report with the plugin author, that there does not seem to be a way to easily override the plugin's font selection, and with the above info about DejaVu vs. Bistream Vera, though perhaps there is a reason for the latter. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
