# Re: [NTG-context] math: \text does not scale properly

On Sat, 20 Oct 2012, Aditya Mahajan wrote:

On Thu, 4 Oct 2012, Andreas Mang wrote:

Hi there,

As Aditya mentioned in a former posting (*) that "\text{ ... }" should scale properly when used as super- or subscript, I have prepared a minimal example to demonstrate that it doesn't. In my document I have switched from "\text{ }" to "\normal", which works.

There is another bug with \text.

Actually, the bug is with \setcurrentfontbody

\starttext
ABC \hbox{\setcurrentfontbody{\scriptscriptface} Testing} DEF
\stoptext

The above works correctly in mkii but not in mkiv. I really don't understand what \setcurrentfontbody is supposed to do. In Mkii it scales the bodyfont if \scriptface or \scriptscriptface is used as an argument; but does not work for any other value (e.g. \setcurrentfontbody{20pt}). In MkIV it does not do anything.

There is also a bug in the definition of \text in mkii. In strc-mat.mkii, we should have

\def\domathtext#1%
{\mathchoice
{\dodomathtext\displaystyle        \textface        {#1}}%
{\dodomathtext\textstyle           \textface        {#1}}%
{\dodomathtext\scriptstyle         \scriptface      {#1}}%
{\dodomathtext\scriptscriptstyle   \scriptscriptface{#1}}}

Notice \scriptsctlye and \scriptscriptstyle instead of \textstyle in the last two cases. If \setcurrentfontbody is fixed in mkiv, then the definition in MkIV also needs to be changed in a similar manner.