• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Synthesized bolding in PostScript

Community Beginner ,
Aug 17, 2009 Aug 17, 2009

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.

TOPICS
Programming

Views

876

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Aug 19, 2009 Aug 19, 2009

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

...

Votes

Translate

Translate
Contributor ,
Aug 19, 2009 Aug 19, 2009

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 19, 2009 Aug 19, 2009

Copy link to clipboard

Copied

LATEST

Thanks Helge.

This works great!

Allan.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines