[GRASS-dev] figureing out fonts - part 3 correction
Hamish
hamish_nospam at yahoo.com
Tue May 1 03:59:03 EDT 2007
Michael:
> > > Further testing and looks like d.text DOES respect GRASS_FONT
> > > settings
> > >
> > > This leaves only d.label
Hamish:
> > currently do_labels.c has:
> >
> > #define STANDARD_FONT "romans"
> > ...
> > if (sscanf (text, "%*s %s", font) != 1
> > || !strcmp (font, "standard"))
> > strcpy (font, STANDARD_FONT);
> >
> > we could change that
Glynn:
> "standard" selects "romans" rather than the current font at module
> startup (i.e. that selected by d.font). In that regard, the
> corresponding fix would be e.g.:
>
> const char *std_font;
> std_font = getenv("GRASS_FT_FONT");
> if (!std_font)
> std_font = getenv("GRASS_FONT");
> if (!std_font)
> std_font = "romans";
done in cvs. (for GRASS_FONT only)
d.labels still won't respect d.font, but if the font changes there is no
way to know what it started as for the next font-less label, so I'm not
sure it would be a good idea to try / have it change the default font
part-way through.
> 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.
Hamish
More information about the grass-dev
mailing list