[XeTeX] epsdice package.
Philip TAYLOR (Webmaster, Ret'd)
P.Taylor at Rhul.Ac.Uk
Tue Jul 19 19:57:04 CEST 2011
Philip TAYLOR (Webmaster, Ret'd) wrote:
> Yes, that is the right approach, but implementing it successfully
> requires use of \uccode & \uppercase, or \lccode and \lowercase,
> and the \uppercase/lowercase primitives are, in general, very
> poorly understood. Perhaps easier is to make use of the fact
> that Michael has \XeTeXinterchartoks available to him :
I failed to notice the existence of \newXeTeXintercharclass;
here is an improved version :
\documentclass {minimal}
\usepackage {fontspec}
\setmainfont {Comic Sans MS}
\newfontfamily \Latinfont {Comic Sans MS}
\newfontfamily \Cherokeefont {Code2000}
\newXeTeXintercharclass \Cherokeeclass
\newcount \n
\def \TreatCherokeeCharactersSpecially
{\n = "13A0
\loop
\XeTeXcharclass \n = \Cherokeeclass \relax
\ifnum\n < "13FF
\advance \n by 1 \relax
\repeat
\XeTeXinterchartokenstate = 1
\XeTeXinterchartoks 0 \Cherokeeclass = {\Cherokeefont}
\XeTeXinterchartoks \Cherokeeclass 0 = {\Latinfont}
\XeTeXinterchartoks 255 \Cherokeeclass = {\Cherokeefont}
\XeTeXinterchartoks \Cherokeeclass 255 = {\Latinfont}
}
\begin {document}
The Cherokee alphabet is a Syllabary.
ᏌᏊ: Sah-Gwoo (the "g" here is a bit hard, more like a "k", but not that hard)
ᏍᎪᎯ: Skoh-Hee (the "k" here is a bit soft, more like a "g", but not that soft)
\TreatCherokeeCharactersSpecially
The Cherokee alphabet is a Syllabary.
ᏌᏊ: Sah-Gwoo (the "g" here is a bit hard, more like a "k", but not that hard)
ᏍᎪᎯ: Skoh-Hee (the "k" here is a bit soft, more like a "g", but not that soft)
\end {document}
** Phil.
More information about the XeTeX
mailing list