procedure MakeOutlineFont( basefontname, newfontname, strokewidth, uniqueid )
{
basefontdict = findfont( basefontname );
numentries = maxlength( basefontdict ) + 1;
if ( !known( basefontdict, 'UniqueID' ))
numentries += 1;
outfontdict = dict( numentries );
for ( id:val in basefontdict ) {
if ( id != 'FID' )
outfontdict[ id ] = val;
}
outfontdict.FontName = newfontname;
outfontdict.PaintType = 2;
outfontdict.StrokeWidth = strokewidth;
outfontdict.UniqueID = uniqueid;
definefont( newfontname, outfontdict );
}
if ( known( findfont( 'Helvetica-Bold' ), 'UniqueID' ))
newId = findfont( 'Helvetica-Bold' ).UniqueID + 1;
else
newId = 1;
MakeOutlineFont( 'Helvetica-Bold', 'Helvetica-Outline1', 1000/54, newId );
setfont( scalefont( findfont( 'Helvetica-Outline1' ), 36 ));
moveto( 72, 504 );
show( "outline" );
setfont( scalefont( findfont( 'Helvetica-Outline1' ), 54 ));
show( "outline" );
if ( known( findfont( 'Helvetica-Bold' ), 'UniqueID' ))
newId = findfont( 'Helvetica-Bold' ).UniqueID + 2;
else
newId = 1;
MakeOutlineFont( 'Helvetica-Bold', 'Helvetica-Outline2', 1000/36, newId );
setfont( scalefont( findfont( 'Helvetica-Outline1' ), 36 ));
moveto( 72, 444 );
show( "outline" );
setfont( scalefont( findfont( 'Helvetica-Outline1' ), 54 ));
show( "outline" );
showpage(); |