[PyQt] PyQt support for Myanmar scripts (Burma)

Elvis Stansvik elvstone at gmail.com
Wed Feb 24 21:44:13 GMT 2016

2016-02-24 22:09 GMT+01:00 Timothy W. Grove <tim_grove at sil.org>:
> On 24/02/2016 17:25, Elvis Stansvik wrote:
>> 2016-02-24 13:33 GMT+01:00 Timothy W. Grove <tim_grove at sil.org>:
>>> I'm developing a PyQt4 application here in England, and I know someone
>>> has
>>> been trying it out with Myanmar script, with not very pleasing results.
>>> Their comment was:
>>> Unfortunately it doesn't handle Myanmar script well at all - many
>>> frequent
>>> characters are not even displaying when keyboarded; others are displayed
>>> but
>>> not rendered properly. When I paste in Myanmar Unicode text that has been
>>> properly keyboarded in Word, all the characters show up, but are not
>>> rendered properly...
>>> Does anyone have any experience with this script? Any comments about
>>> complex
>>> script support in PyQt in general? I guess my real question is, would I
>>> see
>>> better results with Myanmar if I moved from PyQt4 to PyQt5 with its ICU
>>> libraries? Thanks for any comments.
>> I don't have a direct answer, but I'm pretty sure Qt doesn't use ICU
>> for text layout, only for locale stuff. I know it uses Harfbuzz for
>> the shaping of glyphs (at least on X11), and it's of course possible
>> there's been some improvement to the Harfbuzz copy that they keep. So
>> I think the best way is to try it out.
>> Elvis
> Well, a quick experiment with PyQt5 shows that something in there makes the
> script display better. Ignorant question, probably, but is there any way to
> add Harfbuzz support into a PyQt4 application without making the full move
> to PyQt5?

Qt 4 uses Harfbuzz as well, it's just using an older version (Qt has a
copy of Harfbuzz in its source tree, at least last time I looked).

And no, no feasible way of upgrading that yourself, as it's quite
integrated into the text layout classes of Qt.

Much better to just take the plunge and port to PyQt5.


> Tim

More information about the PyQt mailing list