On Thu, Jul 15, 2010 at 09:45:57PM +0200, Hans Hagen wrote:
On 15-7-2010 9:24, Khaled Hosny wrote:
In XITS I have stylistic sets (ss01-07) for accessing additional alphabets not bresent in Unicode, or variants of exising ones.
For example, ss01 maps the script alphabets to an alternate calligraphic one, so I did:
\starttext \setupbodyfont[xits] \ctxlua{fonts.otf.features.register_base_substitution('ss01')} \definefontfeature[ss01][mode=base,script=math,ss01=yes] $\addff{ss01}\cal ABCDEFG$ \stoptext
(I was not expecting \addff to work in math, but anyway).
This works, however, but I don't want to set the feature globally:
\starttext \ctxlua{fonts.otf.features.register_base_substitution('ss01')} \definefontfeature[math-text][mode=base,script=math,ss01=yes] \setupbodyfont[xits] $\cal ABCDEF$ \stoptext
math currently operates in base mode; what i can do is map it onto some private range; as the number of math fonts is small it's no big deal to keep either a list of features that provide this; we'd best cook up such a list in small committee
also, context does math different than e.g. latex so having the glyphs in some well defined spot helps macro packages
actually, since there are probably more symbols not in unicode, i think that we need to define some extensions ourselves in the private use area.
I'm not a big fan of private use area myself, it just makes things more unportable. The approach I used is mapping the new characters to the closest matching existing ones, so calligraphic is mapped to script, sans serif Greek is mapped to serif and so on. What I want is a way to use different font for specific parts in the equation, for example a \mathaltcal or \mathsfbfgreek etc that could have a different feature than the main math font. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer