[tex-eplain] TeX--XeT

terry.s at Safe-mail.net terry.s at Safe-mail.net
Thu Oct 12 21:03:12 CEST 2023


Hi Laurence,

I never new about that tool! However, it will not work for *real* Asian fonts in TFM format. (Is TFM the format supported by TeX, as opposed to TTF, etc?) Asian languages use a heck of a lot more than 256 characters. For Japanese, the common-use kanji total about 1800 (about half those are learned by the 8th-grade level). I have a feeling the fonts you listed at the beginning are just some limited characters people "have fun with", where you type stuff on the keyboard and you get unrelated characters (kind of like windings but different).

I was able to produce a chart for 'cmr10' as you did. But it won't work for the ones you listed (or they aren't found on my system). I tried fonts that are installed as TFM such as unisong1a ... it creates the DVI okay, but running dvipdfmx on it gives errors (some shown below).

mktexmf: empty or non-existent rootfile!
Cannot find unisong1a.mf.
I try ps2pk --> gsftopk --> ttf2pk --> hbf2gf
ps2pk cannot be used.
...
Cannot find font unisong1a in mapfile.
...
All trials failed.

Then dvipdfmx tries to locate virtual fonts or a mapfile. (I'm actually shocked a DVI is every created.) If TeX--XeT isn't Unicode or can't handle 3-bit fonts, that would be the explanation. (Asian fonts require 3-bit support.) It seems like only some of the fonts below "public" work. What format should I be looking for? (I know the font types; I mean, what file extension would mktexmf/kpathsea be able to create a map file from or use an existing map file? Not TFM?

Am I to understand TeX-XeT can do LTR/RTL directions but *not* the complex languages that typically use RTL? (If so, I can only use pTeX or upTeX.)
FYI, yes, Unicode Asian fonts that allow characters to be turned already exist and come standard with the Japanese engines (which are equally appropriate to Chinese and Korean). The glypph dimesions are somewhat different for vertical text, and the glue is different, too.

Thank you,
Terry S.

-------- Original Message --------
From: Laurence.Finston at gmx.net
Apparently from: tex-eplain-bounces+terry.s=safe-mail.net at tug.org
To: tex-eplain TUG <tex-eplain at tug.org>
Subject: Re: [tex-eplain] TeX--XeT
Date: Thu, 12 Oct 2023 07:48:02 +0200

> If you're using TeX--XeT and the plain format, to use any characters you want, all you have to do is load the fonts you want:
> 
> \font\chineseten=chinesefontone10
> \font\japanesetwelve=japanese12
> \font\koreanseven=korean7
> 
> etc.
> 
> The encoding is whatever position each character is in in the font.  To find this out easily, use testfont:
> 
> tex testfont
> 
> Then, at the prompt, enter the font you want to test.
> 
> chinesefontone10
> 
> Then, at the prompt, enter \table and then \end.
> 
> This will create a DVI file with a table of the characters, like the one attached for cmr10 (converted to PDF).
> The positions are labelled in octal and hexadecimal, so if you have 8 or 16 fingers, you're in luck.
> 
> To typeset a character, you just type \char\char65 or \char'101 or \char"41 to get the letter "A", for example.
> 
> It would be sensible to define macros and/or active characters to get the characters you want.
> 
> \catcode`\H=13
> \defH{\char65}
> 
> Then, when you type H, you get the letter A.  It's fine for a couple of letters, but not really a good solution for the general problem or for the case where you need a lot of letters.  And a font can only hold 256 characters, so you'd need a lot of them;  maybe too much for TeX's capacity.
> 
> There is another solution using the facilities designed for math fonts, but I don't recall the details and I don't think it's worth it.  I personally would look for something other than TeX that's designed for this purpose.
> 
> I actually think turning letters and pages on their sides would be a perfectly reasonable thing to do for a couple of displays, though not as a general solution.  It really isn't hard to modify fonts in simple ways.
> 
> > Gesendet: Donnerstag, 12. Oktober 2023 um 07:16 Uhr
> > Von: terry.s at Safe-mail.net
> > An: tex-eplain at tug.org
> > Betreff: [tex-eplain] TeX--XeT
> >
> > Laurence, thanks for reminding me. I've heard of that once or twice and should check it out. (The Asian character-maps and hyphenation patterns would still matter, except for short phrases.)
> >
> > Terry S.
> >



More information about the tex-eplain mailing list.