RE: Chinese Simplified appearance



Thanks to all who responded.  The responses were very informative.

I used pango_context_set_language in this case and got very good-looking,
uniform display.

It does seem that this dependency on a language setting goes against the
overall thrust of Unicode/Pango and really complicates development.
Previous to this, I had thought that having the proper Unicode characters
was all that should be needed.

-----Original Message-----
From: Owen Taylor [mailto:otaylor redhat com] 
Sent: Wednesday, August 31, 2005 8:47 PM
To: Boncek, John
Cc: gtk-i18n-list gnome org
Subject: Re: Chinese Simplified appearance

On Wed, 2005-08-31 at 15:26 -0500, Boncek, John wrote:
> Attached is a screen shot of a screen we are generating using Pango
> with GTK 2.2.4.  It is a print preview screen with the printout mostly
> in Chinese Simplified.  Does the Chinese look correct?  It looks to us
> like Pango may have selected different sizes or boldness of fonts for
> different characters in the same line in many cases.  Does it do this
> automatically when the selected font size doesn't have all the
> characters, or is there some other problem?

To get good looking display of East Asian languages, you generally have
to let the system know *which* language the text is. Otherwise, it will
select a font character by character and unless your lucky and the
right font happens to be first, you'll get this sort of ugly mix.

You can do that various ways:

 - Use the LANG environment variable

 - Use pango_context_set_language()

 - Use a language PangoAttribute 

 - Use <span lang='zh-cn'>[blah]</span> PangoMarkup

Regards,
					Owen







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]