[XeTeX] epsdice package.

Philip TAYLOR (Webmaster, Ret'd) P.Taylor at Rhul.Ac.Uk
Mon Jul 18 13:57:47 CEST 2011



Philip TAYLOR (Webmaster, Ret'd) wrote:
>
>
> Peter Dyballa wrote:
>
>> Right! Make character \n active and \define it as character \n from
>> font \Cher.
>
> 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.

But just in case Michael is not deterred by that fact, here is the
same thing implemented using \uccode, \uppercase and active characters :

	\documentclass {minimal}
	\usepackage {fontspec}
	\setmainfont {Comic Sans MS}
	\newfontfamily \Cherokeefont {Code2000}
	\newcount \n
	\def \loopbody {}
	\def \TreatCherokeeCharactersSpecially
		{\n = "13A0
		 \loop
			\uccode `\~ = \n \relax
			\catcode \n = \active
			\uppercase {\edef ~{{\noexpand \Cherokeefont \char \number \n \relax}}}
		 \ifnum \n < "13FF
			\advance \n by 1 \relax
		 \repeat
		}
	\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