×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Can fonts be (affine) transformed in PCL?

Can fonts be (affine) transformed in PCL?

Can fonts be (affine) transformed in PCL?

(OP)
Hello,

I am looking for a way to keep the hight of a monospaced 10 chars per inch font when changing its pitch (count) parameter to 12, 15 and 17. In Postscript this can be achieved in applying a matrix to an existing font, for example:

CODE

/Courier [10 0 0 12 0 0]

but how can this effect be achieved in PCL? Simply modifying the pitch parameter decreases both hight and width of the characters. But I have to keep the hight and only compress the width.
Any ideas?

Jörg

RE: Can fonts be (affine) transformed in PCL?

Select the font in the size that you require - for a fixed-pitch scalable font, as you have probably discovered, this is actually done by choosing a particular pitch. For example:

  {esc}(19U{esc}(s0p12h0s0b4102T

for 12 characters-per-inch LetterGothic.

Then set a different pitch, by using the Set Horizontal Motion Index (HMI) escape sequence to set a different horizontal advance; for example:

  {esc}&k15H

sets the advance at 15/120 inch, equivalent to 8 cpi.

This ONLY works for fixed-pitch scalable fonts; with proportionally-spaced scalable fonts, HMI only affects the space character.

RE: Can fonts be (affine) transformed in PCL?

You can do this in HP-GL/2. See the SI command.

I don't know of any way in the PCL context.

Jim Asman

RE: Can fonts be (affine) transformed in PCL?

If you were to use PCL6 (aka PCL XL) instead of PCL5, all scalable fonts can be scaled and/or skewed, in either or both horizontal and vertical axes.

But PCL6 is MUCH more difficult to manipulate, and much less widely documented than PCL5.

RE: Can fonts be (affine) transformed in PCL?

(OP)
Hello DansDad and Jlasman,

thank you for your response.
DansDad, your example works fine if you want to increase the space between the characters. But since the actual character size is not modified at all, overprinting happens when decreasing the space.

Jlasman, yes, with the SI-command of HP-GL it works. Only the size values in cm are somewhat strange to me.
If somebody is interested, for a standard 10 cpi or 12 point font I would have expected the character width to be 0.25 (1 inch = 2.5 cm), but by means of trial and error I found out it is 0.212 (and 0.3 for the height).

Thanks, once again

Jörg

RE: Can fonts be (affine) transformed in PCL?

At 12 cpi the advance from character cell to character cell is .25 in. The actual width of ther character is necessarily something smaller to allow for some intercharacter spacing. Obviously, an "I" will be narrower than a "W" even though the character advance is the same for both.

The actual height of the characters will be dependent on the font design; e.g., Letter Gothic characters are taller than Courier characters at a given pitch.

Jim Asman

RE: Can fonts be (affine) transformed in PCL?

To add to Jim's point regarding height/pitch ratios:

With Courier, the aspect ratio is approximately 60%; to put it another way:

pitch (characters-per-inch) * height (points) = 120

With LetterGothic, the aspect ratio is approximately 50% (or cpi*pts=144).

RE: Can fonts be (affine) transformed in PCL?

(OP)
Aha! Thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close