I want to understand how to set up fonts in CoNTeXt using \definefontfamily
. It works more or less, except that I do not understand how does ConTeXt find the fonts and how to specify their names. In the following example I want to use a totally different font for the slanted alternative:
\definefontfamily [mainface] [rm] [PT Serif] [sl=file:PonomarUnicode]
\definefontfamily [mainface] [ss] [PT Sans]
\definefontfamily [mainface] [tt] [PT Mono]
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]
\setupbodyfont[mainface]
\mainlanguage[russian]
\starttext
Немного {\em русского} текста для пробы.
And some English too, with a formula:
\startformula
\frac{dU_i}{dt} = \int_0^\infty e^{-tx^2} \, dx.
\stopformula
\stoptext
I have all the fonts installed system-wide in /Library/Fonts
, PT fonts come with OS X (and I believe many linux distros). TeX Gyre and Ponomar Unicode were installed from the MacTeX as otf
's. Ponomar Unicode can be found in /Library/TeX/Root/texmf-dist/fonts/opentype/public/fonts-churchslavonic
.
When I compile the document above, it gets all the fonts, except for Ponomar Unicode:
If everything was right, the word "русского" should have been emphasised like:
Apparently, I got "file:PonomarUnicode" part wrong. So the question is how to get it to work and how ConTeXt actually resolves font references in \definefontfamily
to the font files?