🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.postscript.programming
Article #1517

Re: Bold font

#1517
From: Odysseus
Date: Tue, 02 Jul 2002 21:42
46 lines
3602 bytes
Darwin Lee wrote:
> 
> Is there any way of making a font bold within PostScript if you don't already have a bold version of the font - i.e. can you pseudo bold the font easily??
> 
> Thanks in advance for help. If you have any examples, please forward them to dar@leedmedia.co.uk

The only truly satisfactory solution IMO is to get a 'real' bold font.
If none is available for the design you want, you can use a font editor
like Macromedia Fontographer to create one far better than any _post
hoc_ manipulation you can do in PostScript.

That said, I can think of three ways to make a pseudo-bold font; which
one will work best in a given situation depends on the original font
design, the size you're working at, and how the job will be rendered or printed.

The method least damaging to the original design would be to make a
pseudo-extended font instance by stretching it horizontally. One way to
do this is to use the "makefont" operator instead of "scalefont". For
example to set up a 12-point font that's pseudo-extended by 25% you
could write "[12 0 0 15 0 0] makefont" (or even "[12 0 0 12 1.25 mul 0
0] makefont") instead of "12 scalefont". The result will not be truly
bold, but will have a 'thicker' appearance. Note that vertical elements
will thicken but horizontal ones won't, and that slanted (italic or
script) fonts will appear at a steeper angle than normal.

Another way to go is to add a thin stroke around the characters. This
can be done by using the "charpath" operator together with "stroke" and
"fill" instead of "show"; to avoid artifacts at sharp corners make sure
you have set an appropriate mitre limit, or avoid the issue by using
rounded line joins. The main drawback of this method is that the font
design is thrown out of balance by the way the strokes reduce the size
of its counters and thicken serifs (if any); you may also need to add a
bit of letterspacing to prevent the 'fattened' characters from appearing
to touch one another.

The third method is, I believe, used by some printer drivers to create a
pseudo-bold font: set two or more copies of the text with a small
offset. This can be reasonably effective at small sizes or low
resolutions, but otherwise will tend to show artifacts at corners &c.
unless you use many copies offset by tiny amounts, and the more copies
you need the less efficient the program will be. In any case you'll be
subject to some of the same problems as with the second method above,
although you might be able to ameliorate them to some extent by using
different horizontal and vertical offsets.

--Odysseus
Technical Details
Message-ID: <3D221E96.F80B949A@yahoo.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!news-out.visi.com!hermes.visi.com!news.maxwell.syr.edu!cyclone.bc.net!newsfeed.telusplanet.net!news0.telusplanet.net.POSTED!53ab2750!not-for-mail
References: <ef9734d.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c61a,d9cd55949db5ff88
X-Google-Attributes: gid10c61a,public
X-Google-ArrivalTime: 2002-07-02 14:44:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!news-out.visi.com!hermes.visi.com!news.maxwell.syr.edu!cyclone.bc.net!newsfeed.telusplanet.net!news0.telusplanet.net.POSTED!53ab2750!not-for-mail
Message-ID: <3D221E96.F80B949A@yahoo.ca>
From: Odysseus <odysseus1479@yahoo.ca>
X-Mailer: Mozilla 4.7 (Macintosh; I; PPC)
X-Accept-Language: en,pdf
MIME-Version: 1.0
Newsgroups: adobe.postscript.programming
Subject: Re: Bold font
References: <ef9734d.-1@WebX.aaQKaf7vad4>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 46
Date: Tue, 02 Jul 2002 21:42:59 GMT
NNTP-Posting-Host: 142.179.162.200
X-Trace: news0.telusplanet.net 1025646179 142.179.162.200 (Tue, 02 Jul 2002 15:42:59 MDT)
NNTP-Posting-Date: Tue, 02 Jul 2002 15:42:59 MDT