Alan Bowen <mailto:[email protected]>
2. Oktober 2017 um 14:04
I need to substitute the regular and italic characters of a publisher’s non-math font (Unicode) for those in a math font.

The non-math addresses are:
0041-005A, 0061-007A %italic uppercase and lowercase
0391-03A9, 03B1-03C9  %slanted Greek uppercase and lowercase

The math addresses are:
1D434-1D44D, 1D44E-1D467 %italic uppercase and lowercase
1D6E2-1D6FA, 1D6FC-1D714  %slanted Greek uppercase and lowercase

Is there a way to use the \definefallbackfamily mechanism that does not assume that the characters have the same Unicode addresses? Or is some other approach required?
The fallback mechanism provides a offset key which lets you replace a math character with a normal text character.

\definefontfamily     [mainface] [ss] [TeX Gyre Heros]

\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercasenormal] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercaseitalic] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [tf=style:italic,range=0x68,offset=0x210E]% lowercase italic h \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercasebold] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercasenormal] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercaseitalic] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercasebold]

\definefontfamily     [mainface] [mm] [TeX Gyre Pagella Math]

\starttext

\setupbodyfont[pagella]

Lowercase: $ {\tf abc} {\it abc} {\bf abc} $

Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $

\setupbodyfont[mainface]

Lowercase: $ {\tf abc} {\it abch} {\bf abc} $

Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to