Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1071 > unrolled thread

Getting a list of the installed fonts

Started byCecil Westerhof <Cecil@decebal.nl>
First post2012-11-24 21:23 +0100
Last post2012-12-29 14:43 -0800
Articles 8 — 6 participants

Back to article view | Back to comp.lang.postscript


Contents

  Getting a list of the installed fonts Cecil Westerhof <Cecil@decebal.nl> - 2012-11-24 21:23 +0100
    Re: Getting a list of the installed fonts Luuk <luuk@invalid.lan> - 2012-11-24 21:53 +0100
      Re: Getting a list of the installed fonts Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 00:39 +0100
    Re: Getting a list of the installed fonts Chris <cjl@spamcop.net> - 2012-11-24 23:39 +0000
    Re: Getting a list of the installed fonts John Deubert <john@acumentraining.com> - 2012-11-27 11:07 -0800
      Re: Getting a list of the installed fonts "luser.droog" <luser.droog@gmail.com> - 2012-11-27 23:59 -0600
        Re: Getting a list of the installed fonts Chris <cjl@spamcop.net> - 2012-11-28 09:25 +0000
    Re: Getting a list of the installed fonts jdaw1 <jdawiseman@gmail.com> - 2012-12-29 14:43 -0800

#1071 — Getting a list of the installed fonts

FromCecil Westerhof <Cecil@decebal.nl>
Date2012-11-24 21:23 +0100
SubjectGetting a list of the installed fonts
Message-ID<87obimn41v.fsf@Compaq.site.inet>
Is there a way to get a list of all the installed fonts I can use in
postscript? Then I can make demos from all, so I can decide which ones
I want to use.

If it is important: I am working with Linux.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [next] | [standalone]


#1072

FromLuuk <luuk@invalid.lan>
Date2012-11-24 21:53 +0100
Message-ID<imo7o9-fj1.ln1@luuk.invalid.lan>
In reply to#1071
On 24-11-2012 21:23, Cecil Westerhof wrote:
> Is there a way to get a list of all the installed fonts I can use in
> postscript? Then I can make demos from all, so I can decide which ones
> I want to use.
>
> If it is important: I am working with Linux.
>

$ man fc-list
NAME
        fc-list - list available fonts

SYNOPSIS
        fc-list [ -vVh ]  [ --verbose ]  [  [ -f format ]  [ --format 
format ]  ]  [ --version ]  [ --help ]

         [ pattern  [ element... ]   ]

DESCRIPTION
        fc-list lists fonts and styles available on the system for 
applications using fontconfig.  If any elements are specified,
        only those are printed.  Otherwise family and style are printed, 
unless verbose output is requested.

.......

[toc] | [prev] | [next] | [standalone]


#1074

FromCecil Westerhof <Cecil@decebal.nl>
Date2012-11-25 00:39 +0100
Message-ID<87haoemuzt.fsf@Compaq.site.inet>
In reply to#1072
Op zaterdag 24 nov 2012 21:53 CET schreef luuk@invalid.lan:

> On 24-11-2012 21:23, Cecil Westerhof wrote:
>> Is there a way to get a list of all the installed fonts I can use in
>> postscript? Then I can make demos from all, so I can decide which ones
>> I want to use.
>>
>> If it is important: I am working with Linux.
>>
>
> $ man fc-list
> NAME
> fc-list - list available fonts
>
> SYNOPSIS
> fc-list [ -vVh ]  [ --verbose ]  [  [ -f format ]  [ --format
> format ]  ]  [ --version ]  [ --help ]
>
> [ pattern  [ element... ]   ]
>
> DESCRIPTION
> fc-list lists fonts and styles available on the system for
> applications using fontconfig.  If any elements are specified,
> only those are printed.  Otherwise family and style are printed,
> unless verbose output is requested.

Thanks. That gave almost 400 fonts. A little to much.

By using:
    fc-list : family 

It is halved.

Then I used:
    fc-list : family | sort
to get them sorted.

This way I can skip a lot that are different versions of the same.

By the way: I have a font M+. I find this a little strange for the
name of a font.

I have tried the following fonts (you need to skip the spaces in font names):
    /SertoBatnan findfont fontsize scalefont setfont
    /SertoJerusalem findfont fontsize scalefont setfont
    /SertoJerusalemOutline findfont fontsize scalefont setfont
    /SertoKharput findfont fontsize scalefont setfont
    /SertoMalankara findfont fontsize scalefont setfont
    /SertoMardin findfont fontsize scalefont setfont
    /SertoUrhoy findfont fontsize scalefont setfont
    /SonyFixed findfont fontsize scalefont setfont
    /URWBookmanL findfont fontsize scalefont setfont
    /URWChanceryL findfont fontsize scalefont setfont

What I find strange is that all the Serto fonts (except
SertoJerusalemOutline) look for me exactly the same.

I think I like the URW fonts the most.

Well I am going to make a document with the fonts that look the most
interesting.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [next] | [standalone]


#1073

FromChris <cjl@spamcop.net>
Date2012-11-24 23:39 +0000
Message-ID<TUcss.345042$nB6.82624@fx21.am4>
In reply to#1071
On Sat, 24 Nov 2012 21:23:24 +0100, Cecil Westerhof wrote:

> Is there a way to get a list of all the installed fonts I can use in
> postscript? Then I can make demos from all, so I can decide which ones I
> want to use.
> 
> If it is important: I am working with Linux.

Look up the resourceforall operator in the PLRM.

Chris

[toc] | [prev] | [next] | [standalone]


#1114

FromJohn Deubert <john@acumentraining.com>
Date2012-11-27 11:07 -0800
Message-ID<2012112711075255785-john@acumentrainingcom>
In reply to#1071
On 2012-11-24 20:23:24 +0000, Cecil Westerhof said:

> Is there a way to get a list of all the installed fonts I can use in
> postscript? Then I can make demos from all, so I can decide which ones
> I want to use.
> 
> If it is important: I am working with Linux.


You can use the resourceforall operator:

	(*) { = } 100 string /Font resourceforall

The above line of PostScript code will send a list of all available 
fonts to stdout (the log file if you're using Distiller or GhostScript 
as your interpreter). The arguments, from left to right above, are:

	(*)		A filter string; "*" means "include everything"
	{ = }	A procedure body that will be called repeatedly, once for each 
Font. When executed,
				the procedure will find on the stack a string containing a font name.
	100 string	This creates a 100-character string to be used as temporary storage
				for the font names.
	/Font	The type of resource we are enumerating; fonts, in our case.

Note that this won't list any CIDFonts (used for Asian and other 
multibyte fonts); to get a list of these, replace "/Font" with 
"/CIDFont" in the above line o' code.

- John


-- 
========
John Deubert
Acumen Training
PostScript & PDF Engineering Classes & Consulting
www.acumentraining.com

Learn PostScript programming techniques!
Read the free Acumen Journal
acumentraining.com/acumenjournal.html

[toc] | [prev] | [next] | [standalone]


#1116

From"luser.droog" <luser.droog@gmail.com>
Date2012-11-27 23:59 -0600
Message-ID<k9498o$k2i$2@dont-email.me>
In reply to#1114
John Deubert wrote:

> On 2012-11-24 20:23:24 +0000, Cecil Westerhof said:
> 
>> Is there a way to get a list of all the installed fonts I can use in
>> postscript? Then I can make demos from all, so I can decide which ones
>> I want to use.
>> 
>> If it is important: I am working with Linux.
> 
> 
> You can use the resourceforall operator:
> 
> (*) { = } 100 string /Font resourceforall
> 
> The above line of PostScript code will send a list of all available
> fonts to stdout (the log file if you're using Distiller or GhostScript
> as your interpreter). The arguments, from left to right above, are:
> 
> (*)           A filter string; "*" means "include everything"
> { = } A procedure body that will be called repeatedly, once for each
> Font. When executed,
> the procedure will find on the stack a string containing a font name.
> 100 string    This creates a 100-character string to be used as temporary
> storage for the font names.
> /Font The type of resource we are enumerating; fonts, in our case.
> 
> Note that this won't list any CIDFonts (used for Asian and other
> multibyte fonts); to get a list of these, replace "/Font" with
> "/CIDFont" in the above line o' code.
> 
> - John
> 
> 

What reasons are there to prefer this to the old-school version:

  FontDirectory { pop == } forall

??

[toc] | [prev] | [next] | [standalone]


#1117

FromChris <cjl@spamcop.net>
Date2012-11-28 09:25 +0000
Message-ID<zMkts.574389$Tf3.442890@fx12.am4>
In reply to#1116
On Tue, 27 Nov 2012 23:59:51 -0600, luser.droog wrote:

> What reasons are there to prefer this to the old-school version:
> 
>   FontDirectory { pop == } forall

That's not equivalent.

FontDirectory (and GlobalFontDirectory) contain all the fonts 
instantiated into VM, that is font resources that have had "definefont" 
executed on them. Since very few (maybe none, now) rips load *all* 
available fonts into VM at initialisation, you won't get a comprehensive 
list.

"resourceforall" iterates through resources available to the rip *from 
any source* - so it will find font resources in VM, on disk, in a ram 
disk etc. The slight wrinkle is resources defined during a job, which 
will be found by resourceforall for the duration of their lifetime in VM.

Chris

[toc] | [prev] | [next] | [standalone]


#1210

Fromjdaw1 <jdawiseman@gmail.com>
Date2012-12-29 14:43 -0800
Message-ID<f1b5f687-90c5-47b2-83c1-41ba3c1f18f5@googlegroups.com>
In reply to#1071
www.jdawiseman.com/papers/placemat/fonts_illustrated.ps makes a file to demonstrate to me what fonts are installed. It might suit your purposes as-is, and if not, is readily altered. 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web