This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: RE: Cygwin XFree 4.1.0 doesn't Display Multibyte Character
- To: "'cygwin-xfree at cygwin dot com'" <cygwin-xfree at cygwin dot com>
- Subject: RE: RE: Cygwin XFree 4.1.0 doesn't Display Multibyte Character
- From: Suhaib Siddiqi <ssiddiqi at inspirepharm dot com>
- Date: Tue, 5 Jun 2001 20:53:19 -0400
Here is something for users who are facing Multibyte Character Display
issues. This will go in future FAQ.
For Multbyte Display 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.x server/xfs (x
font server)) are running, this is not always the case. The traditional
approach on Xwindow system, which is portable, is to combine several font
files to make a single logical font. XFontSet is a facility offered by Xlib
forsuch 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.
Suhaib