[GRASS-dev] Problem with font selection in gis.m on Windows

Michael Barton michael.barton at asu.edu
Sat May 5 13:10:39 EDT 2007


I lifted this from Init.sh, where it checks for things like Mingw and
Cygwin, so I thought it would work with windows. If it doesn't, I guess it's
pointless to have it in Init.sh too.

As the current font selection is done, I need to know if a Mac, Windows, or
other system is running to know where to look for fonts. If uname doesn't
work on Windows, I don't know how to find this out.

If there is no other solution, I'll try to implement an alternate kind of
dialog, using a listbox and the new and improved freetypecap file, like I've
done for the wxPython GUI.

Michael


On 5/4/07 9:06 AM, "Paul Kelly" <paul-grass at stjohnspoint.co.uk> wrote:

> The recent talk of fonts on this list brought me to try out some stuff on
> Windows. I discovered there's a font selector control in gis.m (Config
> Menu-->Set default display font) but if I click the button to try and
> change it to anything other than Romans I get the following error:
> 
> couldn't execute "uname": no such file or directory
> couldn't execute "uname": no such file or directory
>      while executing
> "exec uname -s"
>      (procedure "Gm::SelectFont" line 7)
>      invoked from within
> "Gm::SelectFont"
>      ("uplevel" body line 1)
>      invoked from within
> "uplevel \#0 $cmd"
>      (procedure "Button::_release" line 18)
>      invoked from within
> "Button::_release .dispfont.fontopt2.b"
>      (command bound to event)
> 
> Obviously trying to use the "uname" command (not available on native
> Windows) is the bug, but looking closer at the code (line 537 onwards in
> gui/tcltk/gis.m/gm.tcl) it seems the relevant part is trying to put
> together directories to search for Freetype fonts in? Which
> (a) shouldn't even be needed here as I have the stroke font radio button
> in the dialog selected and don't even have GRASS compiled with Freetype
> support and
> (b) might possibly be being made redundant by Glynn's new script to
> populate $GISBASE/etc/freetypecap?
> 
> Not sure what's the best way to fix this, taking into account those
> points.
> 
> Paul
> 
> 

__________________________________________
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