[GRASS-user] v.label utf8 possible?

Robert Kuszinger kuszinger at giscom.hu
Tue Jun 28 05:16:20 PDT 2016


Glynn,

thanks for the answer.

"I wouldn't expect it to work with anything which
generates PostScript."

I also tested it not only with ps.map but also cairo ps output and ps
driver.
ps.map and ps driver fails with utf-8 vector using Biolinum font.
Ghostscript drops the an error on the resulting ps (see e-mail end)


Good news:

Cairo ps output generates even utf-8 d.vect correctly (with rasterized font
glyphs), but ignores

export GRASS_RENDER_PS_HEADER=FALSE
export GRASS_RENDER_PS_TRAILER=FALSE

settings. Well, this is understandable since these are PS driver options. A
beautiful combination would be to use the cairo PS output with the options
above... I know, it is something cairo internal...

thanks again
Robert



--------------------------------------gs all.ps

GPL Ghostscript 9.19 (2016-03-23)
Copyright (C) 2016 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /rangecheck in --imagemask--
Operand stack:
   17354512   0   true   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--
--nostringval--   false   1   %stopped_push   1983   1   3   %oparray_pop
1982   1   3   %oparray_pop   1966   1   3   %oparray_pop   1852   1   3
%oparray_pop   --nostringval--   %errorexec_pop   .runexec2
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push
--nostringval--   --nostringval--   1880   5   3   %oparray_pop
Dictionary stack:
   --dict:1200/1684(ro)(G)--   --dict:0/20(G)--   --dict:103/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 10807894
GPL Ghostscript 9.19: Unrecoverable error, exit code 1




2016-06-28 0:06 GMT+02:00 Glynn Clements <glynn at gclements.plus.com>:

>
> 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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160628/236276f3/attachment.html>


More information about the grass-user mailing list