Skip to content

Better support for surrogate pairs and ligatures on Windows (GTK3)

LRN requested to merge lrn/gtk:ligatures into gtk-3-24

This is an attempt to fix issue #1428 (closed).

The changes work for me, and fix the problems pointed out by the original submitter. The patches also do not seem to introduce any API breakages, although API behaviour changes somewhat, obviously.

That said, there's one remaining problem: GTKIMContextSimple uses guint16 for a lot of keyval manipulations, which breaks the cases where keyval is bigger than guint16 (such as the 'Y' and backtick keys in Gothic layout). Unfortunately, fixing that requires some major surgery all over gtkimcontextsimple.c, gtkimcontextsimpleseqs.h and compose-parse.py, and changes of the gdk_win32_keymap_check_compose() function that was introduced in 3.20 and is part of the GDK API now. Fixed that too, if somewhat inelegantly.

GTK4 will require similar changes.

Edited by LRN

Merge request reports