Re: [gtk-list] Pango question

Mikael Hermansson <> writes:

> Hello I have a question about pango.

Questions about Pango definitely belong on gtk-i18n-list.
> I tried to write a very simple application to see
> how Pango works but found that it will not show text
> if there is characters that is over the
> range ASCII > 128 using:

ASCII is restricted to seven bit characters. 
> pango_layout_set_text(..)
> and when drawing using:
> pango_x_layout_render(...)
> I know that Pango is using some kind of scripts
> but does this means Pango needs a script for every country?
> Or does it mean i need to convert every ASCII character to
> UTF-8 before calling any *_set_text routine?

ASCII doesn't require conversion.

> Even if the country is using old 8 bit characters sets?

Yes. The point of Pango is that you do ONE thing so that your
program works in every country. Traditionally: 

 A US programmer has written a program that works only for ASCII
 A European programmer has fixed up the program to work with iso8859-1
 A Japanese programmer has a patch to make it work with EUC-JP

And the people in Egypt and India still don't have anything that
works. With Pango, just like with Java, programmers are told that
"everything is UTF-8", and if the programmer handles that, then their
code will work for every script.

> Maybe this is a dumb question. But I have tried to read
> the API/documentation but I'm still a bit confused...

Well, yes, there is a lack of "programmer documentation" - what is
there now is raw API documentation and design docs. And things are
still changing rapidly. I'm now working on converting GTK+ over to
Pango, and making quite a few changes to Pango that I find are
necessary when actually using it for real things.


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