🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36961

Re: Using 16 bit fonts

#36961
From: Erik M. van der Poel
Date: Sat, 17 Feb 1990 08:46
127 lines
4543 bytes
In article <1990Feb16.221802.20196@agate.berkeley.edu> Sean N. Welch writes:

> Basically, after having specified something like k14 as the titlefont
> for xterm in a .twmrc for twm v 1.104 89/12/14

The R4 twm does not call the 16 bit text drawing functions, so you
cannot get Kanji in a title bar unless you change twm.


> how can we specify characters to go into the title (printable
> characters, that is)?  We have tried fooling around with different
> quoting of hex and octal representation, but without success.

There are many ways to tell twm what to put in the titlebar, and I
don't claim to know all of them, but here are a couple:

	Client command line

		In xterm's case, for example, you might use -title.
		However, this does not work if you specify the string
		in a Kanji code with the 8th bit up, and you are using
		an ordinary shell that uses the 8th bit for something
		else. Some well known Kanji codes are JIS, Shift-JIS,
		and EUC, of which only JIS uses just 7 bits of each
		byte.

	Resource file

		For xterm, you might have the following:

			somename*title: kanjistring


In (new) JIS, for example, "Kanji" is "^[$B4A;z^[(J", where the "^["
is supposed to be Escape (033).

The "^[$B" takes you into JIS, and the "^[(J" takes you back out
again, so the actual characters (kan & ji) are "4A;z". That's 16 bits
per character.

You can easily create a program that prints Kanji on your X display if
you use some of the library functions that come with R4. For example,
to convert from JIS to an internal format you could use

	convJIStoJWS()

and to write that internal format out to the screen, you use

	XWSDrawImageString()

both under contrib/clients/kinput/xlocal/.

There is a lot of software for using Japanese in the R4 distribution,
so to give you some idea, I present a



		Guide to Oriental Language Support in X11R4


This is a list of directories and files in the X11R4 distribution
where you can find something related to oriental languages. This list
is not guaranteed to be complete, and is not in any particular order.

mit/lib/X/
mit/doc/Xlib/
mit/hardcopy/Xlib/

	XDrawText16(), XDrawString16(), XDrawImageString16()

mit/fonts/bdf/misc/k14.bdf

	A 14-by-14 dot Kanji font.

mit/clients/xfd/

	Yes! You can use the ordinary xfd to display Kanji!

contrib/clients/kterm/

	A terminal emulator based on xterm that can display Kanji, and
	allows Kanji input through kinput (see below).

contrib/clients/kinput/

	This daemon pops up a little window for converting from
	English letters to Kana and then to Kanji, by talking to
	another server called jserver (part of Wnn).

contrib/clients/kinput/xlocal/

	This library contains utilities for converting between various
	code types and for drawing text.

contrib/clients/mlx/

	This directory contains a terminal emulator, Japanese, Chinese
	and Taiwanese fonts, and some utilities.

contrib/lib/mbx/

	Multibyte X - some code to draw 16 bit characters. This code
	is associated with a proposal for multibyte processing in X.

contrib/lib/XJ/

	Another terminal emulator, and various libraries and utilities
	for input and output of Japanese. These also use Wnn.

contrib/lib/Wnn/

	This system contains the jserver which converts from Kana to
	Kanji, using general, specialized and customized dictionaries.


------------------------------------------------------------------------

Last but not least I should mention nemacs (Nihongo emacs), a Japanese
emacs based on GNU emacs. This is not in X11R4, but is used here by
many people on a daily basis. It is available through ftp in the US as
well.


Erik M. van der Poel                  erik@sra.co.jp             (Japan)
SRA, 1-1-1 Hirakawa-cho, Chiyoda-ku   erik%sra.co.jp@uunet.uu.net  (USA)
Tokyo 102 Japan. TEL +81-3-234-2692   erik%sra.co.jp@mcvax.uucp (Europe)
Technical Details
Message-ID: <1460@sragwa.sra.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!sun-barr!ccut!kogwy!wnoc-tyo-news!sragwa!sravd.sra.JUNET
References: <1990Feb16.221802.20196@agate.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!sun-barr!ccut!kogwy!wnoc-tyo-news!sragwa!sravd.sra.JUNET
From: erik@sravd.sra.JUNET (Erik M. van der Poel)
Newsgroups: comp.windows.x
Subject: Re: Using 16 bit fonts
Keywords: kanji
Message-ID: <1460@sragwa.sra.co.jp>
Date: 17 Feb 90 08:46:23 GMT
References: <1990Feb16.221802.20196@agate.berkeley.edu>
Sender: news@sragwa.sra.co.jp
Reply-To: erik@sra.co.jp (Erik M. van der Poel)
Organization: Software Research Associates, Inc., Japan
Lines: 127