> As for 1., Kawakami-ChangGil's patch implements all the required stuffs in
> (IMHO) a clean and elegant way. I think this part can be integrated into
> LyX without problems.
Could you factor out this part of the patch?
Then we can look at it, and if it looks good, apply it to cvs.
That should at least make the CJK patch smaller, and thus closer to
real integration.
> 3. is clearly addressed in Dekel's patch. However, the approach is rather
> problematic from the point of view of CJK-support. My main concern is
> the availability of ISO 10646 fonts. Although it shouldn't be a problem
> on systems where truetype font renderers (e.g. XFree86 ver4.0 server/xfs)
> are running, this is not always the case. The traditional approach on X
> window system, which is portable, is to combine several font files to
> make a single logical font. XFontSet is a facility offered by Xlib for
> such purpose. The essential idea is that a user requests a XLFD >>WITHOUT<<
> a font norm and Xlib appends font norms according to the locale:
> For example, if I aliase Japanese gothic(which is in fact a sans serif) to
> helvetica and requests
> oc = XCreateOC(om, XNBaseFontName,
> "-*-helvetica-medium-r-normal-*-14-*-*-*-*-*", NULL);
> under LC_CTYPE=ja_JP, then
> -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-1
> -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-jisx0201.1976-0
> -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-jisx0208.1983-0
> -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-jisx0212.1990-0
> will be loaded and I can access the XFontStructs via
> XFontsOfFontSet(oc, &FS, &charlist);
> and
> XmbDrawString(dpy, win, oc, gc, x, y, mb_string, num_bytes);
> will draw a multibyte string automatically switching the real fonts used.
> As I already noted, a quite amount of Kawakami-ChangGil's patch related
> to 3. is already obsolete and must be rewritten. Also they are incorrect
> in the sense that font norms are specified in XLFD. But this traditional
> approach is, at least at present, much more portable than the approach
> of Dekel's using a single ISO10646-0 font.
So the font selection is based on the global LC_CTYPE?
Hmm, that seems a bit restrictive. Is it not possible to specifically
ask for the font norms for a given locale without setting LC_CTYPE?
That would probably be the best solution, since we would like to
support writing Japanese on a system where the LC_CTYPE might be
set up for Danish.
If we assume that it is possible to specify our own LC_CTYPE without
really doing it (you know what I mean), how would this fit in with
Dekel's approach? Dekel, can the two approaches be integrated in
some way?
Greets,
Asger