🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1189

Re: Printing list of available fonts on LW+

#1189
From: Perry Hutchison
Date: Wed, 18 Oct 1989 03:35
45 lines
1752 bytes
In article <3564@dgis.daitc.mil> generous@dgis.daitc.mil (Curtis Generous)
writes:
>A while back, someone had posted a test program to get a LW+ to print
>a listing of all of the built-in fonts that were available.  Does
>someone have a copy of this?

Here is my version.  For each font in the FontDirectory, it will print the
name of the font and some sample text, at 10 points.  (The font name will
look a bit strange if the font uses a non-standard encoding.  Among the
"standard" 35 fonts, only Symbol and ZapfDingbats exhibit this problem.)

%!
% show a sample of each font in FontDirectory
%
/str 40 string def
/nf 0 def

50 700 translate

FontDirectory
{
    0 50 moveto
    pop dup findfont 10 scalefont setfont
    str cvs show
    0 currentpoint exch pop moveto
    0 12 neg rmoveto
    (The quick brown fox jumped over the lazy dogs.  1234567890) show
    0 currentpoint exch pop moveto
    0 12 neg rmoveto
    (THE QUICK BROWN FOX JUMPED OVER THE LAZY DOGS) show
    newpath
    /nf nf 1 add def
    nf 14 ge
    {
        showpage
        /nf 0 def
        50 700 translate
    } {
        0 50 neg translate
    } ifelse
} forall

nf 0 gt { showpage } if

% end of font sampler
Technical Details
Message-ID: <736@ccssrv.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!tektronix!sequent!ccssrv!perry
References: <3564@dgis.daitc.mil>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!tektronix!sequent!ccssrv!perry
From: perry@ccssrv.UUCP (Perry Hutchison)
Newsgroups: comp.lang.postscript,alt.sources
Subject: Re: Printing list of available fonts on LW+
Keywords: fonts, test
Message-ID: <736@ccssrv.UUCP>
Date: 18 Oct 89 03:35:44 GMT
References: <3564@dgis.daitc.mil>
Reply-To: perry@ccssrv.UUCP (Perry Hutchison)
Distribution: usa
Organization: Control-C Software, Inc., Beaverton, OR
Lines: 45