🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.postscript.programming
7 messages
7 total messages Started by Darwin Lee Tue, 02 Jul 2002 20:12
Bold font
#1516
Author: Darwin Lee
Date: Tue, 02 Jul 2002 20:12
3 lines
967 bytes
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
Re: Bold font
#1517
Author: 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
Re: Bold font
#1518
Author: Gunnar Fing Blodgett
Date: Tue, 02 Jul 2002 22:19
5 lines
949 bytes
Darwin 

Well, you could outline the path (false charpath), then stroke it as well as filling it. Looks pretty bad, though. 

Gunnar
Re: Bold font
#1520
Author: Odysseus
Date: Tue, 02 Jul 2002 23:25
17 lines
1909 bytes
Odysseus wrote:
> 
> 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.
> 
Sorry, I'm a bit brain-dead today and got my coordinates in the wrong
order. The matrices above should (of course!) be [15 0 0 12 0 0] and [12
1.25 mul 0 0 12 0 0] respectively.

--Odysseus
Re: Bold font
#1521
Author: SaGS
Date: Wed, 03 Jul 2002 08:42
5 lines
1445 bytes
Another method: in addition to the normal font, create an outline font with a thick enough outline. (This is a matter of
copying the font dictionary, changing /PaintType and adding the outline width; don't have the details at hand right
now.) Print the text twice, starting at the same position, once with the normal font and then with the outline font. It
doesn't necessarily look (much) better then stroke/filling the charpath, but avoids using complex paths and text remains
text (is not converted to graphics elements).
Re: Bold font
#1522
Author: Aandi Inston
Date: Wed, 03 Jul 2002 09:02
4 lines
923 bytes
You can also show it multiple times, slightly offset. Windows will do
one or other of the techniques discussed, but it looks vile. 

Aandi Inston
Re: Bold font
#1530
Author: Darwin Lee
Date: Wed, 03 Jul 2002 21:52
1 lines
753 bytes
Thanks to you all for your help.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads