View previous topic :: View next topic |
Author |
Message |
raygun n00b
Joined: 03 Sep 2011 Posts: 24
|
Posted: Wed Sep 28, 2011 7:33 am Post subject: Where is the default font for the CUPS lp command specified? |
|
|
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 |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Sun Oct 02, 2011 1:48 am Post subject: |
|
|
Possibly cups tries to outsmart you and converts your text to PostScript.
See if "lpr -o raw" makes a difference. |
|
Back to top |
|
|
raygun n00b
Joined: 03 Sep 2011 Posts: 24
|
Posted: Fri Oct 07, 2011 11:43 pm Post subject: |
|
|
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 |
|
|
raygun n00b
Joined: 03 Sep 2011 Posts: 24
|
Posted: Mon Aug 13, 2012 5:18 am Post subject: |
|
|
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 |
|
|
|