[GRASS-dev] iconv a required dependency for using Freetype?
Glynn Clements
glynn at gclements.plus.com
Fri May 11 12:27:48 EDT 2007
Paul Kelly wrote:
> * Change libdriver to set the encoding according to the value in fontcap
>
> This is probably the most controversial change - not really sure what its
> implications are. Is GRASS_FT_ENCODING still available to override this
> when using direct rendering?
Yes.
> I couldn't find it in the source code
> anywhere although it's documented in lib/init/variables.html.
1. lib/raster/loc_io.c (for direct rendering)
2. display/d.mon/pgms/select.c (for standalone drivers)
> In d.font
> R_charset() is called after R_font() so it should override it OK. Except
> in lib/driver/font_freetype.c the default is ISO-8859-1 but in the
> generated fontcap file it is utf-8 - is that likely to cause any problems
> or unusual behaviour?
There should always be an explicit call to R_charset() before anything
else gets a chance to draw text.
> Also noticed that d.font called G_gisinit() twice - I assumed this was a
> bug and removed the second call (just before G_parser()).
FWIW, G_gisinit() protects against multiple calls (which is good, as
the PNG/PS driver libraries call it from {PNG,PS}_Graph_set(),
although it will already have been called by the module in the direct
rendering case).
> * Fix gis.m to discard stderr from d.font as using R_font() seems to cause
> it to print some PNG driver messages to stderr
d.font has to call R_open_driver() before it can call R_font(); with
direct rendering, R_open_driver() will run the driver's Graph_set()
function, which normally generates some stderr output.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list