Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change an font atribute when the font is unknown? 1

Status
Not open for further replies.

martincab

Programmer
May 12, 2003
39
US
I'm moving Oracle ascii reports from esc/p to PCL, the reports will be printed on both environments (PCL and esc/p).

The most of reports has been translated succesfuly just by changing the file printer specification (an Oracle Reports facility), but there is some cases that i can't be able to resolve (i'm not very familiar with PCL) the Cases are:

1. How can i enable/disable the emphasized and condensed property for an unknown font?, with esc/p this can be done by using the commands <esc>E and <esc>F for the emphasized attribute and <esc>dec(18) and <esc>dec(15) for the condensed attribute.

2. To change the paper size from (14+7/8&quot;)* 11&quot; (for esc/p printers) to 8.5&quot;*13&quot; (for PCL printers), I reduced the font pitch from 12cpi to 13cpi (s13h5v0s0b4099T) for normal font and for condensed font i used 22cpi (s22h5v0s4b4099T), i also reduced the linespacing to (&l5C). I want to know if is possible to reduce the print area without changing the font size and of course the number of colums or rows.

Thanks in advance for any idea.
Martin Cabrera
Colombia South America.
 
<esc>(s0B #medium stroke weight
<esc>(s3B #Bold stroke weight

<esc>&k0S #Normal mode(printer default)
<esc>&k2S #Condensed mode

The top 2 codes are for medium and bold fonts. What you have to understand about a laser printer is that to print bold, a bold version of the font must be resident in the printer. Just issuing a bold command does not guarantee that. If you are using courier, which has all the font variants, then that will work fine. But if you are using, for example, the lineprinter font, it is only available in medium stroke. If you the issue the bold on command, the the printer will substitute a font that does have a bold variant.

Similarly there are the &quot;normal&quot; and &quot;condensed&quot; pitch commands. These are, BTW, outdated and are really legacy commands. I don't have an old manual with me to tell you exactly how this works, other that condensed mode will give you 16.67 cpi and works only with fixed pitch font.

I'm guessing that your Epson is a dot matrix printer, yes?

Probably, bold, italic, and condensed characters are generated by a simple algorithm run against the original. So it is feasible do the transformation that way on a low resolution device and have a single command that will work on all the available fonts. Not so on a LaserJet.

You can change the pitch of the font without changing the size of the characters, using the &quot;horizontal motion index&quot; command to reduce the inter-character spacing. Obviously, if you reduce it very much, characters will overlap.

Pick a font family to use. Set your normal font as the primary font and the condensed font as the secondary. When you want condensed, jump to the secondary, and then back to the primary. There was a thread a day or two ago about this where you can see the command setup.



Jim Asman
jlasman@telus.net
 
Thank you Jim. all your suggestions have worked truly fine!.

We are able now to print the most of our oracle ascii reports in both environments (pcl and esc/p) and the only thing we did was to change the oracle reports printer definition, we have one for epson line printers (esc/p) and another for pcl printers.

When this environment become stable, our next goal will be to use the stapled and punch capabilities of our ricoh printers to automatize many tasks, then may be i will need some PJL help.

Thank you very much.
Martin Cabrera, Colombia.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top