<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1253">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Great! Thanks a lot Vaclov! :)<br>
<br>
os.environ['GRASS_FONT']='Ubuntu:Regular'<br>
<br>
did the trick for me - of course I am on Ubuntu :) <br>
<br>
Thanks for the wxPython text explanation - I was wondering if there where some other d.text-function I might use in my scripting.<br>
<br>
Actually d.text in the gui crashed when I tried it (several times.... without any greek letters)<br>
<br>
Thanks again!  <br>
<br>
Hope to see you in Bonn<br>
<br>
Cheers<br>
<br>
Martin<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF526128"><font face="Tahoma" size="2" color="#000000"><b>Fra:</b> Vaclav Petras [wenzeslaus@gmail.com]<br>
<b>Sendt:</b> 18. mai 2016 16:05<br>
<b>Til:</b> Martin Album Ytre-Eide<br>
<b>Kopi:</b> grass-user@lists.osgeo.org<br>
<b>Emne:</b> Re: [GRASS-user] d.text greek letters.<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_extra"></div>
<div class="gmail_extra">Hello Martin,<br>
<br>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On Wed, May 18, 2016 at 8:30 AM, Martin Album Ytre-Eide <span dir="ltr">
<<a href="redir.aspx?REF=0ttkY6nIrJupCR7XQZZ8PTzl5wgHhbzIWrqK6QB9Lr0KnZJCt3_TCAFtYWlsdG86TWFydGluLkFsYnVtLll0cmUtRWlkZUBucnBhLm5v" target="_blank">Martin.Album.Ytre-Eide@nrpa.no</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
I am struggling with using the greek letter µ in my d.text from a python script:<br>
<br>
I trying something like this<br>
<br>
Module('d.text',text='µ',at=('85','20') charset='utf8')<br>
</div>
</blockquote>
<div><br>
</div>
<div>you need to set GRASS_FONT to some font which supports Greek letters. Use d.fontlist or d.font -l to get the proper names of fonts. This works for me in command line on Ubuntu:<br>
</div>
<div><br>
export GRASS_FONT=Ubuntu:Regular<br>
d.mon wx0<br>
d.text text=èùåñôøõéïðáóäöãçòêëæ÷îùâíìÜÝÞßúÀüýûàþ at=5,95<br>
 </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
<br>
I know that the issue is with the encoding of the characters..... but I do not know how to fix it.
<br>
</div>
</blockquote>
<div><br>
</div>
<div>I'm not sure which operating system you are using but on Linux, you usually don't need to set the font, everything is UTF-8.<br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
<br>
In the gui i can use µ with add text layer - so I guess this is a python to grass issue.
</div>
</blockquote>
</div>
<br>
</div>
<div class="gmail_extra">The behavior is different (for good or bad) - in GUI, d.text is actually not used and wxPython text drawing is used instead.<br>
<br>
</div>
<div class="gmail_extra">Vaclav</div>
</div>
</div>
</div>
</div>
</body>
</html>