[comp.windows.x.motif] Trouble using Motif's XmText widget with k14 Kanji Font

dimitar@quintus.UUCP (Dimitar Bojantchev) (10/06/90)

I am unable to display text in the XmText widget if I set the font to
k14, (two byte, Japanese font).  Looking through the sources of the
text widget it seems that it should handle 16 bit characters, at least
there is code to invoke XDrawImageString16 to draw the text.  It seems
that I am setting the right character codes because it works for me if
I invoke XDrawImageString16 directly.  What am I doing wrong then?

I am using Motif1.0 and Motif1.1 on SUN4/110.

Thanks,

	Dimitar

-- 
Dimitar Bojantchev                    ARPANET: quintus!dimitar@SUN.COM
Quintus Computer Systems, Inc.                 ...sun!quintus!dimitar
1310 Villa Street                     tel. (415) 965-7700 Ext. 314 (work)
Mountain View, CA 94041                    (415) 964-4361          (home)

ogawa@sm.sony.co.jp (Masato Ogawa) (10/16/90)

In article <1431@quintus.UUCP> dimitar@quintus.UUCP (Dimitar Bojantchev) writes:
 > I am unable to display text in the XmText widget if I set the font to
 > k14, (two byte, Japanese font).  Looking through the sources of the
 > text widget it seems that it should handle 16 bit characters, at least
 > there is code to invoke XDrawImageString16 to draw the text.  It seems
 >  	:

No. I'm looking the source in few days (and more), there is not the
right implementation for 16bit code in XmText.
XmText works with "block" structure as you know, but everywhere to set
string data into the structure, block.format is set to FMT8BIT.
So every data are treated as "roman".
  In some places, there are codes for FMT16BIT, but I think they
haven't tested. For example, the "Draw" routine in TextOut.c, the x value
of XDrawImageString16 must be offseted by hoffset of XmText, but not
(refer to the FMT8BIT portion in that routine to know how it should be
written	).
So, If you could set FMT16BIT data into XmText, Kanji's are never
scrolled horizontally. 

And more essential question: How to treat mixed sentense with Kanji
and roman alphabet with XmText...

whitty@hpcvlx.cv.hp.com (Joe Whitty) (10/17/90)

> / hpcvlx:comp.windows.x.motif / dimitar@quintus.UUCP (Dimitar Bojantchev) /  4:14 pm  Oct  5, 1990 /
> 
> I am unable to display text in the XmText widget if I set the font to
> k14, (two byte, Japanese font).  Looking through the sources of the
> text widget it seems that it should handle 16 bit characters, at least
> there is code to invoke XDrawImageString16 to draw the text.  It seems
> that I am setting the right character codes because it works for me if
> I invoke XDrawImageString16 directly.  What am I doing wrong then?
> 
> I am using Motif1.0 and Motif1.1 on SUN4/110.

Sorry, you'll have to wait until Motif 1.2 to get 16-bit support.
There is no way to get the code the execute the XDrawImageString16()
call in Motif 1.0 or Motif 1.1.

> Thanks,
> 
> Dimitar
> 
-- 
> Dimitar Bojantchev                    ARPANET: quintus!dimitar@SUN.COM
> Quintus Computer Systems, Inc.                 ...sun!quintus!dimitar
> 1310 Villa Street                     tel. (415) 965-7700 Ext. 314 (work)
> Mountain View, CA 94041                    (415) 964-4361          (home)
----------

Joe Whitty

ohayon@snoopy.src.ricoh.co.jp (Ohayon Tsiel) (10/17/90)

 Hi,

 For the moment you cannot use kanji in a regular XmText Widget.

 The XmText Widget does not support Compound Strings but only Strings.
 To display Kanji in our applications we use XmLabel. To edit Kanji
 we use the KanjiInput widget developed here.

 Even in Motif.1.1 the XmText widget does not support 2 byte characters.

 T. Ohayon

ogawa@sm.sony.co.jp (Masato Ogawa) (10/17/90)

In article <110630015@hpcvlx.cv.hp.com> whitty@hpcvlx.cv.hp.com (Joe Whitty) writes:
 > Sorry, you'll have to wait until Motif 1.2 to get 16-bit support.

when?
And at that time, how will it be implemented? Compound Text or
Compound String?

whitty@hpcvlx.cv.hp.com (Joe Whitty) (10/17/90)

>/ hpcvlx:comp.windows.x.motif / ogawa@sm.sony.co.jp (Masato Ogawa) /  3:33 am  Oct 17, 1990 /
>>In article <110630015@hpcvlx.cv.hp.com> whitty@hpcvlx.cv.hp.com (Joe Whitty) writes:
>> Sorry, you'll have to wait until Motif 1.2 to get 16-bit support.

> when?

Motif 1.2 will be based on the X11 R5.  R5 is not expected to be
released until the middle of next year.  Motif 1.2 will be some time after
that (the schedule for Motif 1.2 has not been solidified yet).

> And at that time, how will it be implemented? Compound Text or
> Compound String?

Neither!  The R5 Xlib and Intrinsics will be changed to provide 16-bit support.
Motif 1.2 will use these extensions for 16-bit support in the text widget.
These changes will be transparent to text widget's public interfaces.
I am not the one who will be providing the 16-bit support for the text
widget so I can't offer any more details on how it is being implemented.
NOTE: DEC offered a compound string text widget to OSF at the latest sig
meeting, and OSF has taken the offer under review.

Joe Whitty
----------