Change Font Size in CUPS from command line

We are migrating a legacy app from SCO UNIX 5.05 to RHEL 4.  The SCO box dumped text reports to a printer (printer1).  The RHEL box dumps the same text reports to the same printer (printer1); however, the printout looks different.  Our LAN users (Lusers) are complaining because the old print style is "better".

The font is the same (courier).  The CPI is the same 16.7.  The LPI is the same (6 LPI).  The difference is the SCO BOX looks like 8 pt Courier and the RHEL box looks like 10 pt Courier.

How can I pass to CUPS to use 8pt courier?  I imagine a solution like this

lp -dprinter1 -o someoptionhere filename

where the someoptionhere would be -o usefontpoint=8 or whatever...

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

From TFM (


Text Options

The following options apply when printing text files.
Setting the Number of Characters Per Inch

The -o cpi=value option sets the number of characters per inch:

lp -o cpi=10 filename ENTER
lp -o cpi=12 filename ENTER
lpr -o cpi=17 filename ENTER

The default characters per inch is 10.
Setting the Number of Lines Per Inch

The -o lpi=value option sets the number of lines per inch:

lp -o lpi=6 filename ENTER
lpr -o lpi=8 filename ENTER

The default lines per inch is 6.
Setting the Number of Columns

The -o columns=value option sets the number of text columns:

lp -o columns=2 filename ENTER
lpr -o columns=3 filename ENTER

The default number of columns is 1.
Setting the Page Margins

Normally the page margins are set to the hard limits of the printer. Use the -o page-left=value, -o page-right=value , -o page-top=value, and -o page-bottom=value options to adjust the page margins:

lp -o page-left=value filename ENTER
lp -o page-right=value filename ENTER
lp -o page-top=value filename ENTER
lp -o page-bottom=value filename ENTER
lpr -o page-bottom=value filename ENTER

The value argument is the margin in points; each point is 1/72 inch or 0.35mm.
kminfotechAuthor Commented:
This did not answer my question.  In fact, you repeated a lot of the information I posed in the question.

The question is this:

How to I print in a particular pt size font?  For example, I can print in 4 pt arial or 20 pt arial in Windows, how do I do this from the CUPS command line.

Changing cpi from 10 to 17 does NOT change the point size of the font.
Arrange for text files to be passed through a custom ascii-to-postscript filter
such as a2ps, then you can supply any options imaginable

When printing as straight ascii text, the font setting is about entirely
up to your printer and the driver.

You might look at the specifics of your printer driver, but otherwise,
if you are dumping plain text out and not converting to postscript,
it is unlikely that you can establish a default font size: if memory
serves, cups itself does not provide this option.

You might like to check your cups filters directory and see if there are any
special filters your ascii files are passing through already that provide
a font option.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.