F Wolff | 20 Sep 17:38
Favicon

Setting the pango.Language for a widget

Hallo list

I'm struggling to set the language for the pango context of a text view.
Things work well when I'm working with pango layouts

text_view.modify_font works as advertised, but I'm trying
text_view.get_pango_context().set_language(...), with no effect. The
widgets are inheriting correctly from their parents, but I want to set
different languages for widgets in my container.

I attach a minimal Python test case. Any help will be appreciated.

Friedel

--
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/vrot-mango
Attachment (languages.py): text/x-python, 851 bytes
_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
Boncek, John | 22 Sep 16:37
Favicon

RE: Setting the pango.Language for a widget

You set the language twice on "ru".  (such short names...)

-----Original Message-----
From: gtk-i18n-list-bounces <at> gnome.org [mailto:gtk-i18n-list-bounces <at> gnome.org] On Behalf Of F Wolff
Sent: Saturday, September 20, 2008 10:39 AM
To: gtk-i18n-list <at> gnome.org
Subject: Setting the pango.Language for a widget

Hallo list

I'm struggling to set the language for the pango context of a text view.
Things work well when I'm working with pango layouts

text_view.modify_font works as advertised, but I'm trying
text_view.get_pango_context().set_language(...), with no effect. The
widgets are inheriting correctly from their parents, but I want to set
different languages for widgets in my container.

I attach a minimal Python test case. Any help will be appreciated.

Friedel

--
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/vrot-mango

_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
(Continue reading)

F Wolff | 22 Sep 18:35
Favicon

RE: Setting the pango.Language for a widget

On Ma, 2008-09-22 at 09:37 -0500, Boncek, John wrote:
> You set the language twice on "ru".  (such short names...)

Hallo John

Thanks for pointing out the typo. Fixing it however makes no difference.
The glyph used for б should be different for the Macedonian line (the
second one). If I run the program with LANGUAGE=mk both lines are
changed to show the Macedonian shape of the б character. So the call to
get_pango_context().set_language() seems to have no effect in either
case, although pango and my font (Dejavu Sans Book) supports the
language dependent rendering.

Any other ideas? 

Friedel

_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list

Gmane