Simplify redisplay-x/separate_textual_runs
Olivier Galibert
galibert at pobox.com
Fri Mar 30 13:10:25 EDT 2007
On Fri, Mar 30, 2007 at 05:14:47PM +0200, Aidan Kehoe wrote:
> > + int ucs = ichar_to_unicode(ch);
> > +
> > + /* If UCS is less than zero or greater than 0xFFFF, set ucs2 to
> > + REPLACMENT CHARACTER. */
> > + /* That means we can't handle characters outside of the BMP for now */
> > + ucs = (ucs & ~0xFFFF) ? 0xFFFD : ucs;
>
> You???ve just done that Unicode conversion to throw away the result. That???s
> not very constructive, since the XFT redisplay routines *require* that the
> supplied strings are Unicode. I???m fighting with Cygwin right now to get it
> to usefully install fontconfig so I can check this out for certain, but I
> believe strongly that this will break redisplay with non-Latin-1 characters
> under XFT and Mule.
Ok, I don't see how. Did you miss the '~' ? The line keeps the value
as-is if it is in the 0000-ffff range, sets it to fffd otherwise. So
that breaks non-BMP characters indeed, but not non-latin1 ones. The
rest of the Xft code wants an ucs-2 representation at that point.
It's code that was there in the first place. I have no issue with
going to ucs-4 or utf-8 but I didn't want to change things outside of
separate_textual_runs in this patch.
OG.
More information about the XEmacs-Patches
mailing list