On Wed, 22 Jan 2003, Angus Leeming wrote: > > Han, I have had a go at implementing my suggestions. The attached patch should > be functionaly equivalent to yours but is 30kB smaller ;-) >
Your patch works here very nicely, except that form_preferences.C is generated with "zero" size. > It fixes the Status->Statue problem by moving getXFontset out of lyxfont.h and > into xforms/xfont_metrics.h which is where I think it should really go. > Hurrah, you are a real coder ! > It defines a lyx::char_type and a lyx::unsigned_char_type in support/types.h > and uses them. > > It gets rid of Paragraph::wchar_type entirely. Instead, Paragraph::value_type > is defined in terms of lyx::char_type. > Defining "lyx::char_type" can be a real life-saver only if this change is adopted in the lyx source, Right ? > The one place I have not applied this is in support/textutils.h where there is > a change from unsigned char -> wchar_t. I'm not sure if it is safe to use > lyx::unsigned_char_type in these routines. > I'm not sure, either. Can anybody help here ? > There are still lots of places that could be cleaned up. In particular, I'm > sure we could do something similar in buffer.C. Even if all these small > #ifdef I18N blocks cannot be removed, (bet they can ;-), your use of > wchar_t * xyz = new ...; > appears unsafe. Why did you not use a wstring? > Another good example code, please ????!!!! > Anyway, I hope this helps. The resulting executable starts fine, but of course > I do not have the necessary fonts (or knowledge) to use it to write anything > other than english. > With your help, the coding style in the CJK-LyX patch is now really polished. I thank you for that. Since you are caught here, and Miyata does not seem to be active in this mailing list recently, I have a big question for you regarding i18n of xforms library. One of the shortcomings of CJK-LyX is that one cannot input CJK characters onto the xforms box such as boxes in "preferences" or Edit->(Find & Replace) box. I think the problem lies in the poor internationalization of xforms library. Since the library is open-sourced now, I would like to handle the problem. I find "XmbLookupString" is poorly coded in the xforms source and so is "XmbDrawString".But even if these two functions are properly introduced, the problem does notgo away, i.e., the xforms box is not linked with our local multibyte input method. Do I make myself clear? Anyhow, Do you have any idea or comments? Regards cghan