[XeTeX] xltxtra wishlist
Jjgod Jiang
gzjjgod at gmail.com
Wed May 30 10:31:04 CEST 2007
Hi Dongsheng,
I believe Miyata Shigeru has been working on this feature for a long time
and it will be released with the next version of XeTeX (0.998).
In general, I can tell you that Jonathan Kew decided font fallback (which
you demonstrated) is not a good way for typesetting software (while it may
be good for web browsers like Firefox), to have full control on all the
typesetting behaviors, we must assign a "XeTeX character class" to all the
characters in Unicode, for example,
\chardef\@@jop=4
\@for\Punct:={`',`",`(,`〔,`[,`{,`〈,`《,`「,`『,`【}\do{\XeTeXcharclass\Punct=\@@jop}
can assign all these characters to charclass 4. Then, XeTeX allow us to
specify some control sequences between two charclasses:
\chardef\@@nchar=0
\chardef\@@ideog=1
\XeTeXinterchartoks\@@nchar\@@ideog = {\bJap}
This code means we need to execute \bJap command between "normal character"
and "ideograph character", so that we can use \bJap command to switch font.
\XeTeXinterchartoks\@@ideog\@@nchar = {\eJap}
And here, we switched font back for normal characters.
It is, of course, a little bit more complicated than font fallback mechanism,
but it allows us to control space between many possiblities.
And you don't need to bother assigning XeTeXcharclass to those CJK characters
we use daily (including all the Chinese characters), they are automatically
assigned charclass 1 (ideograph) in XeTeX format file.
- Jiang
More information about the XeTeX
mailing list