[GRASS5] d.text.freetype improvement

Glynn Clements glynn.clements at virgin.net
Mon Apr 29 06:13:46 EDT 2002


GRASS wrote:

> I've added freetypecap, FreeType2 definition file for d.text.freetype, into
> $(GISBASE)/etc directory to specify a font conveniently.
> 
> It would be interesting if you want to display non-ASCII text on a monitor.
> Could anyone fill in the file more completely?

I've:

1. Substantially tidied up the changes. Primarily, moving the
freetypecap parsing to a separate function, and using a structure to
represent a freetypecap entry.

2. Fixed the Gmakefile so that the freetypecap will be copied if it is
updated.

3. Added entries for the Luxi TTF fonts (from XFree86 4.0) to the
freetypecap file. These are currently the only viable candidates for
"standard" freetype fonts on Linux.

BTW, this has highlighted a deficiency in the parser interface: if you
provide a default value, you can't tell whether the user actually
specified a value which is the default.

In order to allow the colour, size and charset options to override the
values from the freetypecap file, it is necessary to eliminate the
defaults from the option initialisation, then explicitly choose them
if no answer is obtained from either the freetypecap file or the
option. The drawback with this is that the "help" option won't list
the defaults.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list