[GRASS-dev] font path question for Linux and Windows

William Kyngesburye woklist at kyngchaos.com
Wed May 2 10:24:51 EDT 2007


On May 2, 2007, at 3:10 AM, Glynn Clements wrote:

>> Yes. However, that isn't all of the fonts which fc-list shows. E.g.
>> fc-list shows the PCF fonts, but those don't work with R_font().  
>> Type1
>> fonts work.
>
Ah.

> In addition to scanning directories for files with specific
> extensions, mkftcap also uses the output from "fc-list :outline",
> which should find all of the OSX fonts.

New snag - fc-list :outline doesn't get resource fonts (where all the  
useful MS fonts are).  I believe this is because these contain  
bitmaps for some font sizes, so fc-list is seeing them as bitmap  
fonts, not outlined.

What about fc-list :scalable?  Does that leave out the PCF fonts?  It  
does get the resource fonts for me.

> The updated mkftcap script should cope with multi-font files; the part
> which uses fc-list outputs the index, and should append it to the path
> if it isn't zero. I can't test this, as none of my font files have
> more than one font.
>
Actually, the index from fc-list isn't useful.  All it does is return  
the first index (0) in each file, whether or not it has multiple  
faces.  That is, there is only one entry per font file, which makes  
sense, since it's listing font files and that's all we really want at  
this stage.

The face index should be left to the user to find out, with some sort  
of d.freetype.info command, which could use the FT library to get  
font info in C.  It should return index and face name, so the user  
would know what index to use for which style.  The output could also  
be parsed and used by the GUI so a full list of fonts and styles  
could be build instead of just a list of files.


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an  
illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy





More information about the grass-dev mailing list