[gradsusr] text strings with accented vowels

Julio Figueroa jcfiguero at gmail.com
Mon Aug 28 16:43:23 EDT 2017


Thanks all for the help,

I wrote a little bash script that use different LC_CTYPE an iterates over
all the fonts in /usr/share/fonts to produce a PNG with the string "[Año á
é í ó ú AÑO]". Unfortunately the fonts where not understood by grads. The
script iterates all the fonts and assign the fonts in grads under the font
numbers 10 to 99. I attached the script in case someone needs to try with
different fonts.

I also noticed that when drawing strings with accented vowels after setting
a font (10-99), the display will freeze, and not even reinit will help. I
had to do Ctl+D.
You can reproduce the bug with:
set font 0
draw string 1 1 TéXT 1
set font 5
draw string 1 2 TéXT 2
set font 10 file /usr/share/fonts/default/ghostscript/putr.pfa
draw string 1 3 TéXT 3 * It will not longer allow to draw information after
this command.
set font 0
draw string 1 4 TéXT 4
clear
reinit
set font 0
draw string 1 1 TéXT 5

Perhaps my solution would be to produce my plots in EPS and then with
Imagemagick replace the strings to Spanish.

However, I wonder if recompiling grads using an UTF-8 font will make any
difference.

Cheers,

Julio





On 26 August 2017 at 07:09, Jennifer M Adams <jadams21 at gmu.edu> wrote:

> I don’t know how to do this with Hershey Fonts, but you could probably
> find a font file that will have these accented characters. —Jennifer
>
>
> > On Aug 24, 2017, at 3:05 PM, Julio Figueroa <jcfiguero at gmail.com> wrote:
> >
> > Hi All,
> >
> > I want to add Spanish or French words to my grads plots. Using the
> following command just draw an empty space within the letters A and o.
> >
> > draw string 1 2 Año.
> >
> > I wonder if you have any suggestions in how to draw strings with
> accented characters, like á, é, í, ó, ú, à, è, ì, ò, ù, Ñ or ñ.
> >
> > I am using the binary distribution of grads 2.1.1.b0 for linux.
> >
> > I'll appreciate any help.
> >
> > Julio
> > --------------
> >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
>
> --
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> George Mason University
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>



-- 
-------------------------------------------------
Julio Figueroa
Oceanólogo / Oceanographer
jcfiguero at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170828/5ed7a632/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: search_fonts.sh
Type: application/x-sh
Size: 1835 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20170828/5ed7a632/attachment-0001.sh 


More information about the gradsusr mailing list