Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Where is the default font for the CUPS lp command specified?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Wed Sep 28, 2011 7:33 am    Post subject: Where is the default font for the CUPS lp command specified? Reply with quote

After upgrading from cups-1.2.12-r2 to cups-1.4.6-r2, the default font the lp command uses for a plain text file has changed. This is for a printer connected locally to the parallel port.

Under the old CUPS, lp printed plain text files in Courier. With the new CUPS, although I haven't changed any font settings anywhere (I can't even find a place to specify them in the CUPS user interface), lp uses some other font -- I'm not sure what, but it's definitely not Courier.

Interestingly, if I type

Code:
$ echo Hello > /dev/lp0

the output is printed in Courier; similarly, using the "mpage" utility on a plain text file continues to use Courier as before. So there is something that lp in particular is doing that makes it think it should use a different font.

The ppd file for the printer seems to specify Courier as the default font:

Code:
$ fgrep DefaultFont /etc/cups/ppd/*.ppd
*DefaultFont: Courier

Where is the default font used by lp for plain text files specified?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Sun Oct 02, 2011 1:48 am    Post subject: Reply with quote

Possibly cups tries to outsmart you and converts your text to PostScript.
See if "lpr -o raw" makes a difference.
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Fri Oct 07, 2011 11:43 pm    Post subject: Reply with quote

Using "-o raw" seems to do the same thing as writing to /dev/lp0 directly: it prints the input lines with line feeds but not carriage returns at their ends (thus soon spilling the output off the right side of the page), and leaves the paper right where it is in the printer after the last line, without ejecting it. It does use Courier, but with those other issues, routinely using "-o raw" is clearly inadequate.

Plain lp presumably does some necessary minimal processing, but with the newer CUPS, this processing includes specifying the font. It has to be getting this font from somewhere, but where? An Internet search has turned up others with this question (though usually wanting to change from Courier to something else) but no satisfactory answer.
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Mon Aug 13, 2012 5:18 am    Post subject: Reply with quote

I am now using cups-1.5.2-r4 and still have not found a solution for this. The .ppd file for my printer in /etc/cups/ppd specifies "*DefaultFont: Courier". No other files under /etc/cups say anything about a font. But the default font is still not Courier.

lpoptions's options tell me nothing about fonts, and I can find no other mechanism to change it -- other than the DefaultFont line in the .ppd file that is already being ignored. Anyone have any ideas?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum