Thursday, October 27, 2011

Re: printfont doesn't change font only height on Linux

On 27/10/11 15:23, octoploid wrote:
> I'm trying to change the font that vim uses with the
> hardcopy command:
> set printfont=Consolas:h9
>
> This changes the font height but the font used is still
> Courier:
> %%PageResources: font Courier
>
> Is there a way to actually choose a different font?
>

":help pfn-option" is ambiguous: it says it has "the same format as
'guifont'" but later on it says "on non-Windows systems, only :h11 is
recognised, where 11 is the font size". However, on X11 systems anything
that includes :h11 would be invalid for 'guifont'. So what should
'printfont' be set to in that case? Here are the valid 'guifont' formats
for the various X11 GUI flavours:

GTK2 (but not GTK1):
:set gfn=Consolas\ 9

kvim (obsolete):
:set gfn=Consolas/9/-1/5/50/0/0/0/1/0

Photon (is that X11 or not, I'm not sure):
:set gfn=Consolas:s9

Other X11 (including GTK1 but not GTK2):
:set gfn=-*-consolas-medium-r-normal-*-*-90-*-*-m-*-*

see http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI


Best regards,
Tony.
--
I've had a perfectly wonderful evening. But this wasn't it.
-- Groucho Marx

--
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

No comments: