Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-30-2011, 04:28 PM   #1
LQ Newbie
Registered: Jan 2010
Distribution: Fedora
Posts: 23

Rep: Reputation: 4
Can one change VIM's hardcopy font?

When printing from VIM, is it possible to choose a font other than Courier 10 for the hard copy output? For example, the following commands produce the same postscript file:

:set printfont=Courier\ 10
:hardcopy >
:set printfont=Courier\ 8
:hardcopy >
:set printfont=Luxi\ Mono\ 8
:hardcopy >

It says in the help for printfont that the font NAME (i.e., the typeface) is ignored (which seems stupid, but at least they tell you that) but the SIZE is not. The part about the size not being ignored seems to be a lie. What am I doing wrong?

More importantly, is there a way to change the output typeface to something else? Not that I hate Courier, but I might want my code printouts to be a different typeface.
Old 05-31-2011, 09:58 AM   #2
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
This plugin might help you.
Old 06-07-2011, 06:39 AM   #3
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 4,045

Rep: Reputation: Disabled
@OP: Thread solved?
Old 06-27-2011, 09:40 AM   #4
LQ Newbie
Registered: Jan 2010
Distribution: Fedora
Posts: 23

Original Poster
Rep: Reputation: 4
Not solved

Sorry for not replying for so long, which I guess only hurts me in the long run.

The utility SkyEye provided (which I already found before posting the first time) only lets you tab between choices of Courier font sizes. In essence, that setting changes the value of "printfont." Also, when I actually print, it tries to re-load the color scheme, and somehow failed to do so if I used one from my own home directory instead of the system wide location. Oh, and changing the dialog from <Courier_h8> to <Courier_h10> doesn't ACTUALLY change the font the printer uses---go figure. Nor does changing the value of "printfont" manually or in ~/.gvimrc. There also isn't a choice for a non-Courier typeface.

The answer seems to be, "no, you're not doing anything wrong," and, "no, you can't change the typeface VIM uses to make hard copies."

If anyone who has gotten VIM 7.x for GNU/Linux to change its output typeface (or font size), please let us know what you did (precisely) so I can attempt to repeat it.
Old 05-21-2014, 07:08 AM   #5
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 90

Rep: Reputation: 16
This says
:set printfont=courier:h10
as a possible syntax. It works for me.
To use a font you need to install it or something. In text mode, I believe the choice is smaller then in gui.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Japanese font problem in vim. nithima Linux - Newbie 5 04-19-2010 09:52 PM
How to change font color and font size in terminal ? wlaw Linux - Newbie 3 05-15-2007 08:57 PM
RHCE manuals hardcopy? noir911 Linux - Certification 5 04-15-2007 09:24 PM
VIM font spacing JMJ_coder Linux - Software 1 05-11-2006 05:49 PM
how to set bold-font in vim? minike Slackware 4 02-01-2006 02:20 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration