discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multibytes character support


From: Yen-Ju Chen
Subject: Multibytes character support
Date: Sun, 24 Feb 2002 01:53:18 -0500

  Here is the code that I try to support multibytes character display on
GNUstep.
  So far, I test it on Ink.app and NSTextField, NSButton.
  It should be able to display any multibytes character.
  I test it in traditional Chinese (zh_TW.Big5 encoding).
  The character position is a little bit out of control, but still works.
  I made and tested it by modifying XGContextPrivate.h and XGFont.m
directly.
  Here I just pull out the source code and make them into XmbFontInfo class,
  but I never test them after that because I don't know how to add them into
xgps.
  Functionally, it is extended from originally XGFont.m.
  Therefore, anyone can use it and it should behave like original XGFont.m
  if not working on multibytes system.
  Right now I only modify - draw: method because under my test, no class
use -drawString:.
  Since it is an independent font system as XftFontInfo,
  maybe it is necessary to add a setting in .GNUstepDefaults to activate it
by user.
  but I have no idea how to do that.
  So please help me test it and feel free to modify anything you want.
  I'll keep trying to improve it and try to support Xft, too.
  If I can work it out, maybe we will have four kind of font systems in
xgps:
  the original one (XGFont.m), the anti-alias (XftFontInfo),
  the multibytes (XmbFontInfo), and the anti-alias multibytes (just plan
it).

  I have two questions when I test this class.
  When I use zh_TW.Big5 supported XIM server to input Chinese into
NSTextField,
  it always adds "big5-0" in front of my input automatically.
  For example, when I input a Chinese character "Apple",
  it will show "big5-0 Apple".
  I have no idea whether the problem is on GNUstep XIM client or the XIM
Server I used.
  This XIM server can work on any other system like gnome/gtk, kde/qt.
  Therefore I think maybe the problem is on GNUstep XIM client.

  Since programmers can't assign the font to NSMenu, which always use the
default font,
  is there any standard way that users can assign the default font by
themselves ?
  As far as I know, there is no standard font people will use in Chinese
xwindow,
  therefore it will be difficult to assign the default Chinese fonts by
programmer
  because they don't knwo what fonts the user have.
  If user can set the default Chinese fonts by themselves,
  it will be much easy to change the font of NSMenu to a suitable one.

  Any suggestion is welcome.
  Thanx.

  Yen-Ju

Attachment: XmbFontInfo.tar.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]