marr@dev8n.mdcbbs.com (Jack Marr) (09/24/90)
We are trying to display mixed ASCII/Kanji strings using the HP X11 system and the fonts from the Japanese NLIO 98861A. Our method of displaying these mixed strings on DECwindows and Sun's X implementation is to parse through the string and direct characters or sub-strings to XDrawImageString (ASCII) or XDrawImageString16 (Kanji) as appropriate. In HP X11 this doesn't work. In fact the only way we can get these strings to display is to direct them to XDrawImageString exclusively. Since we haven't loaded the Kanji font (j16.16x32), and the ASCII/Kana font (jpn.8x32) definitely doesn't contain any Kanji characters (if xfd is to be believed), we are a bit confused. How is mixed ASCII/Kanji display supposed to work, and how can we tell that Kanji characters are available? Additional info: I note in the example in HP-UX "A Guide to Internationalization of Software", on the X11 Window System (section 8.2) that only the jpn.12x24 font is loaded, but that Kanji characters are displayed. So I guess this is working as designed, but we're still mystified as to the mechanism. BTW, this is the only FM we have on the Japanese NLIO. -- Jack Marr | Voice: (714) 952-6526 McDonnell Douglas M&E | Internet: marr@mdcbbs.com Cypress, CA 90630 | FAX: (714) 952-5734
arnet@hpcupt1.HP.COM (Arne Thormodsen) (09/26/90)
Jack, I've forwarded your question onto the guy who wrote our X11 Kanji support, if he isn't too busy then he should be able to get to you. In the meantime, I can (maybe) help you with two points (please keep in mind that I am a total novice when it comes to X) ( rah-rah on :-) 1> HP doesn't have TWO output routines because we don't need them. The approach we have consistently tried to implement is "a character is a character is a character" regardless. The idea of segregating 8 and 16 bit output strikes me as somewhat klunky, with the HP approach the same code work for German, Japanese, English, whatever. Why use different techniques for different locales? 2> HP's Asian fonts come in two files, the small one contains the "ASCII" characters, the large one contains the "Asian" characters. The large file is an "associated" font to the smaller file, and is loaded when needed. The mechanism is automatic and transparent to the application. ( rah-rah off :-) --arne Arne Thormodsen Hewlett-Packard CSG Internationalization No opinions expressed here should be taken as Hewlett-Packard policy.