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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing font weight in Postscript

Status
Not open for further replies.

flash3433

Programmer
Mar 16, 2004
18
How can I change the weight of a font within a postscript document? I don't mean changing the font SIZE, like 12 point, but changing the thickness of the strokes making up the letter?

Thanks
 
Hi flash3433,

You could use something like:
Code:
Helvetica findfont [15 0 0 12 0 0] makefont
This would give you the quivalent of 15pt wide Helvetica text that is only 12pt high.

Cheers

[MS MVP - Word]
 
Yes, I use that now. But it results in distortions if the dimensions are too different in size. I want something that uniformly changes the weight of the strokes. What are the other zero's for in the

[15 0 0 12 0 0] makefont

command?
 
Hi flash3433,

What are the other zero's for
This is all standard transformation matrix stuff defined in the Adobe
PostScript Language Reference Manual, 3rd Ed (Red Book) (aka PLRM).

makefont uses a six-element matrix, for which the:
.1st element defines the height
.2nd element defines the amount of rotation
.3rd element defines the obliqueness (italics)
.4th element defines the width
.5th element defines the vertical offset
.6th element defines the horizontal offset

If makefont doesn't do what you want, you could try the techniques outlined
in the PRLM for 'Achieving Special Graphical Effects'. Depending on what
fonts you're using, you may be able to alter the stroke width - but note
that this will increase the height too, so you may need a combination of
this and makefont.

There are some potentially useful examples in the PostScript Language
Tutorial and Cookbook (Blue Book) too.

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top