[comp.fonts] Code sample for Bolder bold fonts

rcd@ico.isc.com (Dick Dunn) (11/16/90)

patrick@thomas.com (Patrick O'Shaughnessy) writes:
> Some time ago I posted a question about how to make a bold font bolder.
> The two methods most commonly suggested were to print the font some number
> of times sighltly offset or actually design a new font.

[explanation, PostScript code deleted]

Problem with that, as Patrick is aware, is that it fattens more in one
direction than another.  You can work in multiple directions--but that's
still rough, and somewhat painful.

Here's another way to go at it.  The trick is the ability to "outline" the
glyphs with charpath, and the fact that stroking that path will center the
line on the boundary of the character.  Thus, stroking a charpath will
extend the boundary outward by 1/2 linewidth.  This uniformly "fattens"
outward from the strokes.  If you overdo it, it's going to be ugly, but
that's true of any artificial emboldening.  An example "show bolder" proc
is:

%	Bshow - show artificially emboldened string in current font
/Bshow {			% string Bshow -
	currentlinewidth exch	% protect environment
		currentpoint
		2 index show	% normal display
		moveto		% back to start point
		1 setlinewidth	% (for sake of illustration)
		false charpath stroke
	setlinewidth		% restore
} def

The "1 setlinewidth" is just for the sake of a simple illustration; the
actual linewidth needs to be tied to the font size and degree of embold-
ening desired.
-- 
Dick Dunn     rcd@ico.isc.com -or- ico!rcd       Boulder, CO   (303)449-2870
   Cellular phones: more deadly than marijuana.