simon-svn: putty: simon

tartarus-commits at lists.tartarus.org tartarus-commits at lists.tartarus.org
Sat Nov 18 15:10:48 GMT 2006


SVN root:       svn://ixion.tartarus.org/main
Changes by:     simon
Revision:       6910
Date:           2006-11-18 15:10:48 +0000 (Sat, 18 Nov 2006)

Log message (22 lines):
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.)

Modified files:
U   putty/minibidi.c
U   putty/putty.h
U   putty/windows/window.c

Links:
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi?rev=6910&view=rev
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/putty/minibidi.c?rev=6910&r1=6909&r2=6910
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/putty/putty.h?rev=6910&r1=6909&r2=6910
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/putty/windows/window.c?rev=6910&r1=6909&r2=6910



More information about the tartarus-commits mailing list