[GRASS-dev] [bug #4905] (grass) gis.m: d.text.freetype does not
allow spaces in text
Glynn Clements
glynn at gclements.plus.com
Thu Aug 31 18:15:16 EDT 2006
Maciek Sieczka via RT wrote:
> > With the difference that you do
> >
> > text='Population total' in bourne shell
> >
> > but
> >
> > {text=Population totale}
> >
> >
> > The backslash solution works and seems more intuitive.
> > I'll add a hint in the gis.m description.html.
>
> Do you think that d.text.freetype (and other modules that may require {} or \
> for attributes to work properly from gis.m) could put {} or \ automatically
> for the user?
No.
Well, gis.m *could* add braces or backslashes based upon some
arbitrary heuristics, but there's no way that it can be done reliably.
E.g. the following:
d.text.freetype text=text color=string
can be legtimately interpreted as either:
d.text.freetype {text=text} {color=red} ...
or:
d.text.freetype {text=text color=red} ...
The former draws the string "text" in red, while the latter draws the
string "text color=red" in the default colour.
Computers cannot read minds; that isn't a bug, that's just how it is.
If you want a space to be treated as a literal character rather than
as an argument separator, you have to say so.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list