Xlib and the X protocol provide text handling calls in versions that
take both 8-bit and 16-bit character indices. They are mostly
interchangable, except that of course the 8-bit calls can only access
characters with codes up to 255.
Heretofore, PuTTY used the 16-bit X calls when using a font in the
"iso10646-1" encoding and 8-bit calls otherwise. This led to a lot of
duplicate code, and in particular two large and almost identical
implementations of x11font_cairo_draw*().
Now, PuTTY uses 16-bit calls throughout, even when using an 8-bit font
encoding. This simplifies the code at the expense of needing an
extra bit of conversion to expand the char array that we get from
put_wc_to_mb() into an array of XChar2b when using an 8-bit font.