[GRASS-dev] iconv a required dependency for using Freetype?

Glynn Clements glynn at gclements.plus.com
Sun May 13 03:18:16 EDT 2007


Hamish wrote:

> Paul: 
> > > * 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
> 
> that will also mask any real warning and error messages, which isn't so
> nice. Makes debugging + support much harder.
> 
> Glynn:
> > 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.
> 
> G_message() or G_warning()?

G_message():

	G_message("PNG: GRASS_TRUECOLOR status: %s",
		true_color ? "TRUE" : "FALSE");

	G_message("PNG: collecting to file: %s,\n     GRASS_WIDTH=%d, GRASS_HEIGHT=%d",
		file_name, width, height);

> if just G_message(), d.font could run  G_putenv("GRASS_VERBOSE","0"); to
> disable all uninteresting messages and % done but still keep G_warning()
> and G_fatal_error()s.
> 
> I think
>   G_putenv("GRASS_VERBOSE","0");
> will do the same as 
>   G_set_verbose( G_verbose_min() );
> 
> ? So better to use the latter ? Will level set with G_set_verbose()
> reset when the module exits, or will it be persistent within libgis?
> In that case, the former is preferred and the latter should be avoided
> for general use by modules.

>From the GUI, I would think that just using "d.font --q -l" would be
the most straightforward solution.

d.font itself shouldn't be forcing a specific verbosity level; that's
the caller's decision.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list