]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Reinstate as much of the Windows font-linking behaviour as I can
authorSimon Tatham <anakin@pobox.com>
Sat, 18 Nov 2006 15:10:48 +0000 (15:10 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 18 Nov 2006 15:10:48 +0000 (15:10 +0000)
commit230d400ddc4e802b64b9664431c9429bfb4cfd66
tree5b3cc086c1cc60de55959c8d0347ede7278c431f
parent53843b73924bcc77a0d1ec60366aa10c6346cbd8
Reinstate as much of the Windows font-linking behaviour as I can
easily manage, by adopting a hybrid approach to Unicode text
display. The old approach of simply calling ExtTextOutW provided
font linking without us having to lift a finger, but didn't do the
right thing when it came to bidirectional or Arabic-shaped text.
Arabeyes' replacement exact_textout() supported the latter, but
turned out to break the former (with no warning from the Windows API
documentation, so it's not their fault).

So now I've got a second wrapper layer called general_textout(),
which splits the input string into substrings based on bidi
character class. Any character liable to cause bidi or shaping
behaviour if fed straight to ExtTextOutW is instead fed through
Arabeyes' exact_textout(), but the rest is fed straight to
ExtTextOutW as it used to be.

The effect appears to be that font linking is restored for all
characters _except_ Arabic and other bidi scripts, which means in
particular that we are no longer in a state of regression over 0.57.
(0.57 would have done font linking on Arabic as well, but would also
have misbidied it, so we've merely exchanged one failure mode for
another slightly less harmful one in that situation.)

[originally from svn r6910]
minibidi.c
putty.h
windows/window.c