From: Ethan M. <merritt@u.washington.edu> - 2008-01-04 22:18:10
|
On Friday 04 January 2008 13:48, Allin Cottrell wrote: > Sorry, I've lost track: what is the current state of UTF-8 support=20 > in the postscript terminal supposed to be? I sort of thought that=20 > "set encoding utf8" was working for term post, but it seems not. It works here. But you need to use a compatible font file. > I tried a plot containing Polish text with accented characters,=20 > l-slash, and such. =20 >=20 > With the source file in UTF-8, and with the "term post eps" line=20 > preceded by "set encoding utf8", no joy: the accented characters=20 > were missing in the output. I attach the output from the following sequence of commands set encoding utf8 set term post eps fontfile '/home/local/share/ttfonts/verdana.ttf' font '= Verdana' adobeglyphnames set output 'agn.eps' set title "=C5=81=C5=82=C5=83=C5=84=C5=85=C5=86=C5=87=C5=88=C5=A0=C5=A1= =C5=A2=C5=A3=C5=B8=C5=B9=C7=BA=C7=BB=C7=BC=C7=BD=C7=BE=C7=BF" plot sin(x) Note that in this case it was necessary to use the "adobeglyphnames" option. It is very annoying, but you probably have to try both with and without this option for each font. I don't know of any way to query the font externally to ask what convention it uses for glyph names. =46urthermore, because the aglfn.txt contains glyph names for ~1000 charact= ers, the resulting glyph table at the head of your output file is rather large. If you were doing this routinely, you'd might want to create a tailored file containing only the subset of glyphs you expect to need. =46or more information, please see the file unicode_maps.README distributed in the .../term/PostScript/ directory and installed in=20 /usr/local/share/gnuplot/4.3/PostScript/=20 Anyhow, yes it works. But we haven't yet made it trivially easy to use. =2D-=20 Ethan A Merritt |