Re: PyNGL and Cyrillic symbols

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 27 Mar 2008 06:04:42 -0600 (MDT)

Hi Mikhail,

As you know, we are looking at this offline. I'm afraid for now, as
Fred Clare stated, what what you are doing with the text function
code is the best method.

If you wanted cyrillic fonts most of the time, then what we'd
recommend is changing your PyNGL environment so that this is
the default instead of helvetica.

To do this, create a ".hluresfile" file in your home directory, and
add the following line:

*Font : complex_cyrillic

This sets up your PyNGL environment so that this font is used by
default. You won't need to do "~F11~" in every string.

However, if you do this, then to use something other than cyrillic
fonts you would need to use text function codes to get them. For
example, the following would give you "foo1" in cyrillic
font, and "foo2" in helvetica bold font:

   some_label = "foo1~F22~foo2"

Note that you don't need the end "~F~" if this is the last thing in
your string.

For more info on how you can use your ".hluresfile" to further
customize your PyNGL environment, see:

    http://www.pyngl.ucar.edu/Resources/hluresfile.shtml

--Mary

On Wed, 26 Mar 2008, Mikhail Itkin wrote:

> Hi Mary (and all), thanks for the quick respond.
>
> The only problem is that all the maps and charts i produce should have
> all of the inscriptions in Russian, and i have to put quite some text
> there. Looking for each letter in the table takes quite much time. I
> am doing it just like it's suggested at the PyNGL webpage (so the text
> looks like 'some_label = "~F11~foo~F~"' ).
>
> Is there a way to create aliases, or smth like that (or extended font
> table, with both latin and cyrillic alphabets)?
>
> Mikhail
>
> PS. Anyhow, i am very impressed with PyNGL, and will stick to using
> it. With font tables problem doesn't seem to be that big.
> On Tue, Mar 25, 2008 at 7:07 PM, Mary Haley <haley_at_ucar.edu> wrote:
>>
>> Hi Mikhail,
>>
>> Other than using font tables, I'm not sure there's any other way to
>> get cyrillics symbols from PyNGL (our font expert, Fred, may have more
>> to say on this).
>>
>> Meanwhile, can you indicate how using font tables ends up being
>> time-consuming? Then, we might be able to give you some tips to
>> improve this.
>>
>> --Mary
>>
>>
>>
>>
>>
>> On Tue, 25 Mar 2008, Mikhail Itkin wrote:
>>
>> > Hello,
>> >
>> > I am sorry if i am repeating some frequent question, but i haven't
>> > managed to resolve my problem yet via searching forums, etc.
>> >
>> > The problem lays in using cyrillics symbols in all of the plots, maps
>> > that i build with PyNgl. No matter which coding (cp1251, koi8-r or
>> > utf-8) i denote in the script, on the output images there are only
>> > star symbols instead of wanted cyrillic letters.
>> >
>> > I am not familiar how the font system works in PyNGL, but i assume
>> > cyrillics support is missing, though i hope it isn't.
>> >
>> > As i understood there is a workaround for this problem, like using
>> > Font table 11 ("complex_cyrillic"). Then it works, but since i am
>> > using PyNGL quite frequently such way is little bit confusing and time
>> > consuming.
>> >
>> > Is there a fix for such issue?
>> >
>> > Thanks in advance,
>> > Mikhail
>> >
>> > --
>> > Mikhail Itkin
>> > mailto: itkin.m_at_gmail.com
>> > _______________________________________________
>> > pyngl-talk mailing list
>> > pyngl-talk_at_ucar.edu
>> > http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>> >
>>
>
>
>
> --
> Mikhail Itkin
> mailto: itkin.m_at_gmail.com
>
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Mar 27 2008 - 06:04:42 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 01 2008 - 07:40:08 MDT