LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-30-2011, 05:28 PM   #1
kaiserkarl13
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 > myfile.ps
OR
:set printfont=Courier\ 8
:hardcopy > myfile.ps
OR
:set printfont=Luxi\ Mono\ 8
:hardcopy > myfile.ps

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, 10:58 AM   #2
SkyEye
Member
 
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. http://www.vim.org/scripts/script.php?script_id=512
 
Old 06-07-2011, 07:39 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,677

Rep: Reputation: Disabled
@OP: Thread solved?
 
Old 06-27-2011, 10:40 AM   #4
kaiserkarl13
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, 08:08 AM   #5
doru
Member
 
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 85

Rep: Reputation: 16
This says
Code:
: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.
 
  


Reply

Tags
vim


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 10:52 PM
How to change font color and font size in terminal ? wlaw Linux - Newbie 3 05-15-2007 09:57 PM
RHCE manuals hardcopy? noir911 Linux - Certification 5 04-15-2007 10:24 PM
VIM font spacing JMJ_coder Linux - Software 1 05-11-2006 06:49 PM
how to set bold-font in vim? minike Slackware 4 02-01-2006 03:20 PM


All times are GMT -5. The time now is 11:53 PM.

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