[GRASS-dev] [bug #4905] (grass) gis.m: d.text.freetype does not allow spaces in text

mlennert@club.worldonline.be wrote (Thu, Aug 31 2006 09:53:48):

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.

Michael,

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?

Maciek

-------------------------------------------- Managed by Request Tracker

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@gclements.plus.com>