[luatex] Use Math Glyphs from Text Font

Will Robertson wspr81 at gmail.com
Mon Oct 11 10:33:57 CEST 2010


On 2010-10-11 02:54:05 +1030, "C. Comren" 
<ccomren at gmail.com> said:

> Thanks for the pointer. Unfortunately, the mathspec package does not
> compile with LuaLaTeX. After looking at mathspec's code, I tried
> 
> \newfontface\myfont{MyFont}
> \DeclareMathSymbol{A}{\mathalpha}{myfont}{`A}
> 
> It does not work either. Is it possible to access a font that was
> loaded with fontspec (similar to the above) within DeclareMathSymbol?

Yes, but \DeclareMathSymbol only works for glyphs of slot < 256.
The fontspec equivalent would be something like

\newfontface\myfont{MyFont}
\makeatletter
\DeclareMathSymbol{A}{\mathalpha}{\zf at family}{`A}
\makeatother

or (probably better)

\ExplSyntaxOn
\fontspec_set_family:Nnn \myfont {} {MyFont}
\ExplSyntaxOff
\DeclareMathSymbol{A}{\mathalpha}{\myfont}{`A}

Cheers,
Will




More information about the luatex mailing list