[XeTeX] Let's discuss \mathchar again

Jonathan Kew jonathan_kew at sil.org
Tue Dec 13 11:03:44 CET 2005


On 13 Dec 2005, at 3:48 am, Will Robertson wrote:

> If I had access to unicode glyphs with \mathchar, I would attempt  
> to get around to doing the same thing with maths, but at this stage  
> I'm not sure at the fundamental level how TeX (and thus XeTeX) puts  
> glyphs where they go in maths mode.

If I may nit-pick, what \mathchar could (potentially) give you access  
to would be Unicode *characters*. There are no such things as  
"Unicode glyphs". Unicode is a character encoding; character codes  
get mapped to glyphs within fonts. And one of the issues is that math  
typesetting may well require variant *glyphs* for a single  
*character* (with resizable delimiters being the obvious example; not  
sure if there are others), but we don't currently have a well-defined  
standard way to handle this.

> As far as I'm aware, only extensible delimiters and things require  
> specific metric information that isn't provided by unicode; but I  
> *believe* that there is no other restriction.

Right, I think.... all the "resizable" delimiters (and radical, etc)  
are implemented via special functions in the lig/kern program, in the  
TFM file. To work with Unicode-based math fonts and without TFMs,  
we'll need some kind of mechanism for specifying these "recipes".

There are some "extensible character pieces" encoded directly in  
Unicode -- inherited from the old Symbol font, I think -- and so  
these codes could be used, but that doesn't cover all the potential  
extensibles. And it seems likely that math fonts would include actual  
glyphs at multiple sizes, which should be used before falling back on  
piecemeal construction, but there aren't going to be Unicode  
character codes for all these, or even necessarily any fixed  
inventory of available sizes. So this information really needs to be  
associated with the font, and needs to refer to unencoded glyphs, not  
just character codes. In other words, it's a different layer from the  
family and character-code stuff that goes in \mathchar.

Sounds like a perfect fit for an OpenType or AAT feature.... but such  
a feature will need to be designed in association with both the font  
developers and the application writers who will use it. I don't think  
it's quite as simple as widening \mathchar and banging out some new  
tables like those in plain.tex; that would get you a long way, but  
not quite *all* the way.

JK



More information about the XeTeX mailing list