[GRASS-user] v.label utf8 possible?

Glynn Clements glynn at gclements.plus.com
Mon Jun 27 15:06:29 PDT 2016


Robert Kuszinger wrote:

> I'd like to create a label for a point vector map with point names to be
> utilized in map composer (ps.map).
> 
> Everything works except that I cannot use my UTF8 strings. They are
> rendered as latin1 as far as I can see.
> 
> Using d.vect strings are displayed correctly:
> 
> d.vect --quiet map=places at Duna where="type='village' OR type='town'"
> color=none fill_color=red width=1 icon=basic/circle attribute_column=name
> label_color=black label_size=9 font=LinBiolinum_R encoding=UTF-8
> 
> but there is no encoding option in v.label. I've found some links to
> v.label.sa which is not available in my Grass setup nor on the extension
> list.
> Grass version is:

AIUI, v.label simply sets the labels as byte strings. Their
interpretation is determined by the program which actually renders the
labels, either by an explicit call to D_encoding(), or from the
environment variable GRASS_ENCODING, or from the font's default
encoding from the fontcap file.

UTF-8 text should work with d.vect and d.labels if you use a FreeType
font (but not for a stroke font, which only provide glyphs for the
ASCII range). I wouldn't expect it to work with anything which
generates PostScript.

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


More information about the grass-user mailing list