[GRASS-dev] using system fonts?

Michael Barton michael.barton at asu.edu
Mon Apr 23 23:39:17 EDT 2007


If there is a way to get the path from the multitude of font information I
CAN get, I can't find it. Everything but.

What I'd like to get away from is for everyone to have to search for their
fonts to use in GRASS. On the Mac, most are in /Library/fonts. However, some
are also in the X11RC directory. On different Linux systems they are in
other places, and for Windows I have no idea where they live.

This means that there is no way to design a generic font picker for GRASS
that will simply list available fonts. I CAN get a generic font picker from
a GUI package, but at least with wxPython and TclTk, it provides lots of
information about font DESCRIPTION, but nothing (that I can find) about font
LOCATION and file name.

Maybe it's just not possible to specify font description for GRASS display
(or more trouble than it's worth for one reason or another). But it would be
nice.

The other thing that makes this more complicated is that, if I understand it
correctly, font settings do not persist past a single display event. This
provides greater flexibility in creating displays with different fonts, but
it makes it harder to set a default font for all GRASS unless you want to
change it.

This is all doable and possible to have nice displays in GRASS. It's just
complicated to code into a GUI. I'll stop whining now.

Michael


On 4/23/07 7:56 PM, "William Kyngesburye" <woklist at kyngchaos.com> wrote:

> Ah, I was thinking of font rendering with Python, not directly in a
> GRASS display module or driver.  Even so, the Python font API
> (whatever it may be) might have some method of obtaining the font
> file path?
> 
> On Apr 23, 2007, at 9:14 PM, Glynn Clements wrote:
> 
>> 
>> William Kyngesburye wrote:
>> 
>>> I wonder if [wx]Python has a general font handling API that taps into
>>> the platform font/type API - for both selecting and drawing fonts.
>> 
>> Yes. But that doesn't help us at all, as it won't actually tell you
>> where to find the .ttf file so that the display drivers can use it.
>> 
>> -- 
>> Glynn Clements <glynn at gclements.plus.com>
> 
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
> 
> "Time is an illusion - lunchtime doubly so."
> 
> - Ford Prefect
> 
> 

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list