Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1076 > unrolled thread
| Started by | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| First post | 2012-11-25 13:42 +0100 |
| Last post | 2012-11-25 23:20 +0100 |
| Articles | 5 — 2 participants |
Back to article view | Back to comp.lang.postscript
Showing my (or your) fonts Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 13:42 +0100
Re: Showing my (or your) fonts Chris <cjl@spamcop.net> - 2012-11-25 15:48 +0000
Re: Showing my (or your) fonts Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 20:23 +0100
Re: Showing my (or your) fonts Chris <cjl@spamcop.net> - 2012-11-25 19:58 +0000
Re: Showing my (or your) fonts Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 23:20 +0100
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-25 13:42 +0100 |
| Subject | Showing my (or your) fonts |
| Message-ID | <878v9pn9ak.fsf@Compaq.site.inet> |
I made a script to show my fonts. Not ready yet, only the first 48
fonts. ;-) Some things are hard-coded, but in a case like this it
is acceptable I think. Also for some fonts the text goes of the
page, but again: in this case I find it acceptable. (It is only to
get an idea about the fonts.) I use a blue background with
yellow letters, because I find this easier on the eyes. The
script (change the fonts to your fonts): %!PS-Adobe-3.0 %%Creator:
Cecil Westerhof %%Title: Sample Text Effects %%LanguageLevel: 3
/backgroundColour {0 0 1} def /fontsize 12 def /nrOfLines
14 def /pageHeight 842 def /pageWidth 595 def
/textColour {1 1 0} def /x fontsize 2 mul def
/y 0 def /lineHeight fontsize 3 add def
/FreeSans findfont fontsize scalefont (FreeSans)
/FreeMono findfont fontsize scalefont (FreeMono)
/FifthLeg findfont fontsize scalefont (FifthLeg)
/ETLFixed findfont fontsize scalefont (ETLFixed)
/EstrangeloTurAbdin findfont fontsize scalefont
(EstrangeloTurAbdin)
/EstrangeloTalada findfont fontsize scalefont
(EstrangeloTalada)
/EstrangeloQuenneshrin findfont fontsize scalefont
(EstrangeloQuenneshrin)
/EstrangeloNisibinOutline findfont fontsize scalefont
(EstrangeloNisibinOutline)
/EstrangeloNisibin findfont fontsize scalefont
(EstrangeloNisibin)
/EstrangeloMidyat findfont fontsize scalefont
(EstrangeloMidyat)
/EstrangeloAntioch findfont fontsize scalefont
(EstrangeloAntioch)
/EfontFixedWide findfont fontsize scalefont (EfontFixedWide)
/EfontFixed findfont fontsize scalefont (EfontFixed)
/EfontBiwidth findfont fontsize scalefont (EfontBiwidth)
/EastSyriacCtesiphon findfont fontsize scalefont
(EastSyriacCtesiphon)
/EastSyriacAdiabene findfont fontsize scalefont
(EastSyriacAdiabene)
/DroidSerif findfont fontsize scalefont (DroidSerif)
/DroidSansMono findfont fontsize scalefont (DroidSansMono)
/DroidSansHebrew findfont fontsize scalefont (DroidSansHebrew)
/DroidSans findfont fontsize scalefont (DroidSans)
/DejaVuSerif findfont fontsize scalefont (DejaVuSerif)
/DejaVuSansMono findfont fontsize scalefont (DejaVuSansMono)
/DejaVuSans findfont fontsize scalefont (DejaVuSans)
/DECTerminal findfont fontsize scalefont (DECTerminal)
/CourierStd findfont fontsize scalefont (CourierStd)
/CourierNew findfont fontsize scalefont (CourierNew)
/Courier10Pitch findfont fontsize scalefont (Courier10Pitch)
/Courier findfont fontsize scalefont (Courier)
/ComicSansMS findfont fontsize scalefont (ComicSansMS)
/CenturySchoolbookL findfont fontsize scalefont
(CenturySchoolbookL)
/Cantarell findfont fontsize scalefont (Cantarell)
/BitstreamTerminal findfont fontsize scalefont
(BitstreamTerminal)
/BitstreamCharter findfont fontsize scalefont
(BitstreamCharter)
/B&HLucidaTypewriter findfont fontsize scalefont
(B&HLucidaTypewriter)
/B&HLucidaBright findfont fontsize scalefont (B&HLucidaBright)
/B&HLucida findfont fontsize scalefont (B&HLucida)
/ArialBlack findfont fontsize scalefont (ArialBlack)
/Arial findfont fontsize scalefont (Arial)
/ArabicNewspaper findfont fontsize scalefont (ArabicNewspaper)
/AndaleMono findfont fontsize scalefont (AndaleMono)
/AdobeUtopia findfont fontsize scalefont (AdobeUtopia)
/AdobeTimes findfont fontsize scalefont (AdobeTimes)
/AdobeSerifMM findfont fontsize scalefont (AdobeSerifMM)
/AdobeSansMM findfont fontsize scalefont (AdobeSansMM)
/AdobePiStd findfont fontsize scalefont (AdobePiStd)
/AdobeNewCenturySchoolbook findfont fontsize scalefont
(AdobeNewCenturySchoolbook)
/AdobeHelvetica findfont fontsize scalefont (AdobeHelvetica)
/AdobeCourier findfont fontsize scalefont (AdobeCourier)
16 {
backgroundColour setrgbcolor
0 0 pageWidth pageHeight rectfill
textColour setrgbcolor
/y pageHeight lineHeight 2 mul sub def
3 {
x y moveto
/URWBookmanL findfont fontsize scalefont setfont
(Dit is font: ) show show
setfont
/y y lineHeight .5 mul sub def
(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
(a b c d e f g h i j k l m n o p q r s t u v w x y z)
()
(repellat.)
(reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores)
(molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut)
(debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et)
(assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis)
(nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas)
(expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque)
(mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et)
(occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt)
(voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint)
(At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium)
nrOfLines {
/y y lineHeight sub def
x y moveto
show
} repeat
/y y lineHeight 2.5 mul sub def
} repeat
showpage
} repeat
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [next] | [standalone]
| From | Chris <cjl@spamcop.net> |
|---|---|
| Date | 2012-11-25 15:48 +0000 |
| Message-ID | <v5rss.655858$Ol2.342562@fx25.am4> |
| In reply to | #1076 |
On Sun, 25 Nov 2012 13:42:27 +0100, Cecil Westerhof wrote: > I made a script to show my fonts. Not ready yet, only the first 48 > fonts. ;-) Some things are hard-coded, but in a case like this it is > acceptable I think. Also for some fonts the text goes of the page, but > again: in this case I find it acceptable. (It is only to get an idea > about the fonts.) I use a blue background with yellow letters, because > I find this easier on the eyes. The script (change the fonts to your > fonts): <SNIP> If it were me, I would (and did!) do it like this: http://www.ghostscript.com/~chrisl/proof-fonts.ps It doesn't need a hardcoded font list, or hardcoded page size. The only variable is the font size to use in proofing the fonts. If you're using Ghostscript, you can change the font size by adding "-dFSize=<size>" to your command line. This version skips CIDFonts. It's not the most efficient, I could probably be smarter with the stack use, and I don't make any effort to stop the FontDirectory growing. Chris
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-25 20:23 +0100 |
| Message-ID | <874nkdmqpv.fsf@Compaq.site.inet> |
| In reply to | #1077 |
Op zondag 25 nov 2012 16:48 CET schreef Chris: >> I made a script to show my fonts. Not ready yet, only the first 48 >> fonts. ;-) Some things are hard-coded, but in a case like this it is >> acceptable I think. Also for some fonts the text goes of the page, but >> again: in this case I find it acceptable. (It is only to get an idea >> about the fonts.) I use a blue background with yellow letters, because >> I find this easier on the eyes. The script (change the fonts to your >> fonts): > <SNIP> > > If it were me, I would (and did!) do it like this: > > http://www.ghostscript.com/~chrisl/proof-fonts.ps > > It doesn't need a hardcoded font list, or hardcoded page size. The only > variable is the font size to use in proofing the fonts. If you're using > Ghostscript, you can change the font size by adding "-dFSize=<size>" to > your command line. > > This version skips CIDFonts. > > It's not the most efficient, I could probably be smarter with the stack > use, and I don't make any effort to stop the FontDirectory growing. It takes quit a long time to generate. But I'll look into it. Thanks. At least I can try to understand what is happening there. What I like about my version is that it is sorted and I can exclude ‘doubles’. Some fonts (on my system) are about 15 times included in different names. After excluding the doubles I was left with about half of what I had gotten first. And I could make different sets, by making the script use an input of the needed fonts. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [next] | [standalone]
| From | Chris <cjl@spamcop.net> |
|---|---|
| Date | 2012-11-25 19:58 +0000 |
| Message-ID | <BLuss.984337$it2.716896@fx22.am4> |
| In reply to | #1079 |
On Sun, 25 Nov 2012 20:23:40 +0100, Cecil Westerhof wrote: > Op zondag 25 nov 2012 16:48 CET schreef Chris: > > > It takes quit a long time to generate. But I'll look into it. Thanks. At > least I can try to understand what is happening there. The time taken to run is mainly due, on my system, to the number of CIDFont/CMap combinations that resourceforall has to enumerate. > What I like about my version is that it is sorted and I can exclude > ‘doubles’. Some fonts (on my system) are about 15 times included in > different names. After excluding the doubles I was left with about half > of what I had gotten first. And I could make different sets, by making > the script use an input of the needed fonts. OTOH, you have to repeat that entire process every time you want to check the fonts on a new system. Also, I'm assuming you used the output from fc- list, and there's no guarantee that a Postscript interpreter actually uses fontconfig to find fonts - even on Ghostscript, that's an optional feature. My version is portable across systems, and Postscript implementations, and guarantees all the fonts it enumerates are actually available for use by the Postscript interpreter in question. Chris
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-25 23:20 +0100 |
| Message-ID | <87mwy5l3y2.fsf@Compaq.site.inet> |
| In reply to | #1081 |
Op zondag 25 nov 2012 20:58 CET schreef Chris: >> It takes quit a long time to generate. But I'll look into it. Thanks. At >> least I can try to understand what is happening there. > > The time taken to run is mainly due, on my system, to the number of > CIDFont/CMap combinations that resourceforall has to enumerate. It is not a big (or real) problem. I do not think I'll generate the document often. >> What I like about my version is that it is sorted and I can exclude >> ‘doubles’. Some fonts (on my system) are about 15 times included in >> different names. After excluding the doubles I was left with about half >> of what I had gotten first. And I could make different sets, by making >> the script use an input of the needed fonts. > > OTOH, you have to repeat that entire process every time you want to check > the fonts on a new system. Also, I'm assuming you used the output from fc- > list, and there's no guarantee that a Postscript interpreter actually > uses fontconfig to find fonts - even on Ghostscript, that's an optional > feature. All my systems are the same, so it is not a problem (for me). All the fonts from fc-list where found. And I want a sample of the fonts I find most interesting, so that when I make a new ‘document’ I can easily decide which font(s) to use. And then I only need to 20 or maybe even 10, so I not get lost in the choices I have. But maybe after some time I do not need that. After some practice I ‘know’ which font to choose. That would be nice. But again, I find your input useful. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.postscript
csiph-web