[NTG-context] Using stylistic sets in math

Khaled Hosny khaledhosny at eglug.org
Thu Jul 15 21:24:13 CEST 2010


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

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the ntg-context mailing list