[GRASS-dev] figureing out fonts - part 3 correction
Glynn Clements
glynn at gclements.plus.com
Tue May 1 05:28:37 EDT 2007
Hamish wrote:
> > We should probably kill one of GRASS_FONT/GRASS_FT_FONT now that there
> > are no longer separate stroke/freetype fonts.
>
> GRASS_FT_FONT seems like the obvious choice for removal as it is now a
> subset of GRASS_FONT, but not the other way around.
In terms of implementation, they both do exactly the same thing:
lib/raster/loc_io.c:
const char *ftfont = getenv("GRASS_FT_FONT");
...
const char *font = getenv("GRASS_FONT");
...
if (ftfont)
R_font(ftfont);
else if (font)
R_font(font);
else
R_font("romans");
display/d.mon/pgms/select.c:
const char *ftfont = getenv("GRASS_FT_FONT");
...
const char *font = getenv("GRASS_FONT");
...
R_font((ftfont ? ftfont : (font ? font : "romans")));
R_font() gets passed the value of whichever variable is defined; using
GRASS_FT_FONT=romans would work. OTOH, the _FT_ is misleading, so that
one should probably go.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list