]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Fix combining character handling in Pango.
authorSimon Tatham <anakin@pobox.com>
Sat, 26 Sep 2015 09:18:53 +0000 (10:18 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 26 Sep 2015 10:30:59 +0000 (11:30 +0100)
commit854fae843b4b524208a5635ce7c2500ecaff3bbc
tree481f478c0d0998f362c798c5ec682532b9596899
parent431f8db86278836adbe63dba7d1ab25fb94b616d
Fix combining character handling in Pango.

The top-level loop in gtkwin.c which draws text was expecting that the
right way to draw a printing character plus combining characters was
to overprint them one by one on top of each other. This is an OK
assumption for X bitmap fonts, but in Pango, it works very badly -
most obviously because asking Pango to display a combining char on its
own causes it to print a dotted circle representing the base char, but
also because surely there will be character combinations where Pango
wants to do something more sophisticated than just printing them each
at a standard offset, and it would be a shame not to let it.

So I've moved the previous overprinting loop down into the x11font
subclass of the unifont mechanism. The top-level gtkwin.c drawing code
now calls a new method unifont_draw_combining, which in the X11 case
does the same loop as before, but in the Pango case, just passes a
whole base+combinings string to Pango in one go and lets it do the
best job it can.
unix/gtkfont.c
unix/gtkfont.h
unix/gtkwin.c