Copy link to clipboard
Copied
When generating a PDF file I preceed text with something like: "0.46 w 2 Tr" in order to make text in a normal font look bold.
It works just fine in a PDF file but I would like to be able to do the same thing in a PostScript file. Is there any operator or construct of any sort in PostScript that will accomplish this?
Thanks,
Allan.
1 Correct answer
There is no such simple means to achieve this effect in PostScript. You need to do it using a PostScript procedure
like this:
/emulate_bold
{
gsave
1 index show % paint the string by filling
currentpoint % save position at the end of the string
4 2 roll
grestore
gsave
setlinewidth
false charpath stroke
grestore
moveto % move to the end of the string
}bind def
It is to be used like follows
(Symthesized )show (bolding) 0.46 emulate_bold ( in PostScript)show
to achieve
Synthesiz
...Copy link to clipboard
Copied
There is no such simple means to achieve this effect in PostScript. You need to do it using a PostScript procedure
like this:
/emulate_bold
{
gsave
1 index show % paint the string by filling
currentpoint % save position at the end of the string
4 2 roll
grestore
gsave
setlinewidth
false charpath stroke
grestore
moveto % move to the end of the string
}bind def
It is to be used like follows
(Symthesized )show (bolding) 0.46 emulate_bold ( in PostScript)show
to achieve
Synthesized bolding in PostScript
Copy link to clipboard
Copied
Thanks Helge.
This works great!
Allan.

