[XeTeX] Unicode Watch character -> \VarClock

Jonathan Kew jfkthame at googlemail.com
Sun Dec 13 17:31:17 CET 2009


On 13 Dec 2009, at 12:07, Peter Dyballa wrote:

> 
> Am 13.12.2009 um 11:58 schrieb Nicolas Girard:
> 
>> Now, is there any way of getting XeTeX
>> to switch to, say Free Serif, each time it sees that U+231A character
>> ?
> 
> 
> I think that the concept XeTeX character classes would allow this...
> 
> Besides, you could declare a font which has WATCH. Then create a command, say \watch, which selects that font and just inserts that character.
> 
> 
> \newfontfamily{\watchfont}{Free Serif}
> \newcommand{\watch}{{\watchfont ⌚}}
> 
> Or name it \⌚...

Or use an active character:

  \newfontfamily{\watchfont}{Free Serif}
  \catcode"231A=\active
  \def⌚{{\watchfont\char"231A}}

JK



More information about the XeTeX mailing list