在 ConTeXt 中使用特定单色字体时,我希望将此字体用作\tt
也应影响的字体\mathtt
。那么如何将我的主要 tt 字体用作数学 tt 字体?
梅威瑟:
\definefontfamily [test] [rm] [TeX Gyre Pagella]
\definefontfamily [test] [mm] [TeX Gyre Pagella Math]
\definefontfamily [test] [tt] [Fira Mono]
\setupbodyfont [test,12pt]
\starttext
Test \type{Text} with $\mathtt{TEST}$
\stoptext
当前输出:
答案1
将 Fira Mono 设置为uppercasemonospace
和lowercasemonospace
范围的后备。
\definefontfamily [test] [rm] [TeX Gyre Pagella]
\definefallbackfamily [test] [mm] [Fira Mono] [offset=uppercasemonospace,range=uppercasenormal,force=yes]
\definefallbackfamily [test] [mm] [Fira Mono] [offset=lowercasemonospace,range=lowercasenormal,force=yes]
\definefontfamily [test] [mm] [TeX Gyre Pagella Math]
\definefontfamily [test] [tt] [Fira Mono]
\setupbodyfont [test,12pt]
\starttext
Test \type{Text} with $\mathtt{TEST}$
\stoptext