# [NTG-context] Define font based on language

Michal Ondrejáš michal.ondrejas at dlubal.cz
Mon Apr 4 15:17:21 CEST 2016

Hello

I need some help regarding font definitions.

The situation is like this:

\definefont
[issuefont]
[SansRegular at 14pt]
....
{\issuefont \labeltext{issue} \crlf \documentvariable{issue}}

I need to get chinese text into the issue variable, but for that I need
to change the font. I need something like this:

\def\chooseissufont{%
\translate
[zh={Sim Sun},
en={SansRegular}]}

\definefont
[issuefont]
[\chooseissuefont at 14pt]

Using "zh" is ok, I managed to somehow make ConTeXt accept the "zh"
language code. It's not perfect but it's for another topic. I get the
text in this way, but the sizing doesn't work. The text is too small in
all languages.

Any dieas

Thank you,

Michal



More information about the ntg-context mailing list