Am 03.03.2025 um 05:35 schrieb autumnus:
I want to set different fallbackfonts for the main font in the same document.

I think your guess is correct.
Once the fallbacks is set, the mainfont will be bound to the font.
Even if I switch to other typescripts,
as long as its style(rm,ss etc) does not change,
  it will still use the previous fallbackfont.


Even when you use separate typefaces for each fallback font you can shorten the typescript definition when you use \typescriptone and \typescriptwo to select the required fallback etc.

Notice \edefinefontsynonym (with an extra e at the beginning) which is required to use \typescripttwo with the fallbacks key.

%%%% begin example
\starttypescript [serif] [zhfont-garamond]
\definefontfallback [\typescripttwo-serif-regular] [file:ebgaramondregular] [basiclatin] [force=yes]
\stoptypescript

\starttypescript [serif] [zhfont-modern]
\definefontfallback [\typescripttwo-serif-regular] [file:lmroman10regular] [basiclatin] [force=yes]
\stoptypescript

\starttypescript [serif] [zhfont-garamond,zhfont-modern]
\edefinefontsynonym [Serif] [file:adobesongstdlight] [features=default,fallbacks=\typescripttwo-serif-regular]
\stoptypescript

\starttypescript [zhfont-garamond,zhfont-modern]
  \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
\stoptypescript

\starttext

\setupbodyfont[pagella]

abc ABC 123

\setupbodyfont[zhfont-garamond]

abc ABC 123

\setupbodyfont[zhfont-modern]

abc ABC 123

\stoptext
%%%% end example

Wolfgang

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

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to