Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP: XDrawString16 to draw Japanese text onto Motif DrawingArea?!?!

16 views
Skip to first unread message

Kaleb S. KEITHLEY

unread,
Oct 19, 1997, 3:00:00 AM10/19/97
to

Zsolt Ferenczy wrote:
>
> I am working on a Japanese text editor of sorts in Motif. I would like to
> use a Motif DrawingArea as the edit window but I having a little trouble
> displaying double byte fonts. XDrawString16 sounds like exactly what the
> doctor ordered.
>
> So I guess my question is, will XDrawString16 do the trick or is there
> another trick to doing this? I am working on an SGI with X11R6 and Motif 1.2.4
> and on Linux. Both OSes have some of the same fonts and xfontsel and xfd
> display the fonts just fine.

I think you're attacking the problem at too low a level. Use
XmbDrawString or XwcDrawString instead and let them do the translation
from text to the glyph indexes that XDrawString16 wants.

--

Kaleb S. KEITHLEY

Zsolt Ferenczy

unread,
Oct 19, 1997, 3:00:00 AM10/19/97
to

I am working on a Japanese text editor of sorts in Motif. I would like to
use a Motif DrawingArea as the edit window but I having a little trouble
displaying double byte fonts. XDrawString16 sounds like exactly what the
doctor ordered. There is one snag. From the XDrawString man page:

DESCRIPTION
Each character image, as defined by the font in the GC, is
treated as an additional mask for a fill operation on the
drawable. The drawable is modified only where the font
character has a bit set to 1. For fonts defined with 2-byte
matrix indexing and used with XDrawString16, each byte is
used as a byte2 with a byte1 of zero.

How can I set byte1 to something other then zero?? Most fonts like:

-bitstream-gothic-medium-r-normal-square-0-0-0-0-p-0-jisx0208.1983-0
--mincho-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0

have a range from 0x2121 to 0x747e.

So I guess my question is, will XDrawString16 do the trick or is there
another trick to doing this? I am working on an SGI with X11R6 and Motif 1.2.4
and on Linux. Both OSes have some of the same fonts and xfontsel and xfd
display the fonts just fine.

Thanks for the help. Please reply in e-mail or post to comp.windows.x.motif.

--
+---------------------------------------------------------------------------+
Zsolt Ferenczy zs...@sgi.com
Systems Engineer Co-op 770/475-0464
Silicon Graphics, Atlanta

0 new messages