Loading ...
Sorry, an error occurred while loading the content.
 

printfont doesn't change font only height on Linux

Expand Messages
  • octoploid
    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
    Message 1 of 4 , Oct 27, 2011
      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?

      --
      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
    • Ben Fritz
      ... I think that should do what you want. But on Windows apparently the name used is the same format as in guifont . Does Consolas:h9 match what you see if
      Message 2 of 4 , Oct 27, 2011
        On Oct 27, 8:23 am, octoploid <cryptooctopl...@...> 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?

        I think that should do what you want. But on Windows apparently the
        name used is the same format as in 'guifont'. Does "Consolas:h9" match
        what you see if you set your guifont option to Consolas using the
        dialog? Maybe that will help.

        --
        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
      • Tony Mechelynck
        ... :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
        Message 3 of 4 , Oct 27, 2011
          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
        • Magnus Woldrich
          ... About a year ago I was struggling with this issue as well. As far as I can understand, the options you have are limited by your printer, which have a few
          Message 4 of 4 , Oct 28, 2011
            On 2011-10-27 13:23, octoploid wrote:
            >I'm trying to change the font that vim uses with the
            >hardcopy command:
            >set printfont=Consolas:h9

            About a year ago I was struggling with this issue as well. As far as I can
            understand, the options you have are limited by your printer, which have a few
            'built-in' fonts. This might have to do with postscript, but I do not remember
            the details.

            Everyone:
            Is it possible to set the printfont to use in gvim to any arbitary font that you
            have installed? I print out a lot of documentation, and the default monospaced
            font I have to live with is really annoying.

            --
            │ Magnus Woldrich
            m@...
            http://japh.se

            --
            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
          Your message has been successfully submitted and would be delivered to recipients shortly.