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

Wolf Bergenheim wolf+grass at bergenheim.net
Tue May 1 02:07:31 EDT 2007


On 30.04.2007 23:24, Michael Barton wrote:
> Some of these probably won't display with GRASS's TrueType drivers.
> 
> Trying to find all the potentially useable fonts on all kinds of systems is
> indeed a laudable task--and clearly a complex one. My goal is somewhat more

Trying to find all fonts (within a configured font path) on a Linux
system is actually quite easy. Just run the command 'fc-list' If you
want the filenames and the families, you could run 'fc-list : file
family'. Note that this will list also fonts other then truetype fonts,
but that should be ok since at least freetype lib should be able to
display them. if you want to limit to truetype only you can grep for ttf
 ;) there is I think some way to specify it, but I haven't really
researched it. Using this list one could easily construct a freetypecap
file from this.

--Wolf

> modest. I just need to make it easier for people to find where their fonts
> are located so that they can manually pick one they want to use for a
> session default.
> 
> This is pretty easy for Mac and Windows--although recognizing that not all
> fonts will be in 'standard' locations. It is more complicated for Linux,
> where there are several 'standard' locations depending on flavor. What would
> further make this process more convenient is to be able to set a desired
> font path and desired default that will persist beyond each GUI or GRASS
> session.
> 
> Michael
> 
> 
> On 4/30/07 12:54 PM, "William Kyngesburye" <woklist at kyngchaos.com> wrote:
> 
>> On Apr 30, 2007, at 1:50 PM, Michael Barton wrote:
>>
>>> Are any of the fonts normally in the /Library/Fonts directory of
>>> OSX NOT
>>> freetype? Would there be any problem with a non-freetype font
>>> sneaking into
>>> freetypecap beyond it simply not displaying?
>>>
>>> If the answer to these is generally negative, why not just grab all
>>> the
>>> fonts from /LibraryFonts (and maybe $HOME/Library/Fonts) for
>>> freetypecap and
>>> not worry about whether they have a .ttf extension or not.
>>>
>>> Michael
>> This is related to another font item that I hesitated to bring up
>> since the focus has been on TT fonts - postscript and opentype (which
>> are really just font packages for PS and TT) fonts.  Sure, assuming
>> all files are font files may be OK, and thus get all types of fonts
>> (PS and TT).  But with PS fonts, there are multiple files per font face.
>>
>> On OSX there is the bitmap/suitcase that has the pre-made bitmaps for
>> certain sizes and references to all the faces, and then each face has
>> its own PS font file.  You normally reference a suitcase font from
>> the suitcase file and a face index or name, not the PS file (though
>> FT may be able to do that also, I don't know).  And on other
>> platforms PS fonts are usually split into individual faces, but can
>> also have more than one file per face - pfb/pfa, afm and possibly
>> others.
>>
>> You would have to filter out the extras or you will get a mess of
>> duplicate or unusable fonts.
>>
>> One possibility would be to test each font file found with freetype
>> calls, but this might add more time to the startup than simply
>> listing files, and I don't know if it could be done from a script -
>> mkftcap might need to be a C prog.
>>
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>>
>> "Oh, look, I seem to have fallen down a deep, dark hole.  Now what
>> does that remind me of?  Ah, yes - life."
>>
>> - Marvin
>>
>>
> 
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics and Complexity
> Arizona State University
> 
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton 
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-dev mailing list