我使用以下代码设置了备用字体。我的意图是,只要出现中文文本,它就会切换到 SourceHanSerifTC-Heavy.otf,否则它将使用 Garamond。然而,它根本没有切换字体。
\definefontfallback[garamond-fallback][file:~/.fonts/4/SourceHanSerifTC-Heavy.otf][force=yes]
\starttypescript[serif] [garamond]
\definefontsynonym[Serif] [file:~/.fonts/11/EBGaramond12-Regular.otf][fallbacks=garamond-fallback]
\definefontsynonym[SerifBold] [file:~/.fonts/11/EBGaramond12-AllSC.otf][fallbacks=garamond-fallback]
\definefontsynonym[SerifItalic] [file:~/.fonts/11/EBGaramond12-Italic.otf][fallbacks=garamond-fallback]
\definefontsynonym[SerifBoldItalic] [file:~/.fonts/11/EBGaramond12-AllSC.otf][fallbacks=garamond-fallback]
\stoptypescript
\starttypescript[sans] [garamond]
\definefontsynonym[Sans] [file:~/.fonts/11/EBGaramond12-Regular.otf][fallbacks=garamond-fallback]
\definefontsynonym[SansBold] [file:~/.fonts/11/EBGaramond12-AllSC.otf][fallbacks=garamond-fallback]
\definefontsynonym[SansItalic] [file:~/.fonts/11/EBGaramond12-Italic.otf][fallbacks=garamond-fallback]
\definefontsynonym[SansBoldItalic] [file:~/.fonts/11/EBGaramond12-AllSC.otf][fallbacks=garamond-fallback]
\stoptypescript
\starttypescript[garamond]
\definetypeface[garamond] [rm][serif][garamond][default]
\definetypeface[garamond] [ss][sans][garamond][default]
\definetypeface[garamond] [mm][math][modern][default]
\stoptypescript
\setupbodyfont[garamond, 12pt]
\starttext
This should be in garamond, except the Chinese writing.
猫
\stoptext
为什么这不能成功显示中文文本?我尝试使用各种其他字体进行测试,但仍然没有成功。