[NTG-context] Specifying font size as x-height

Stefan Nedeljkovic tsar.srb at gmail.com
Sat May 28 11:40:29 CEST 2022


Perfect, thank you very much Max!

On Sat, May 28, 2022 at 10:40 AM Max Chernoff <mseven at telus.net> wrote:

> On 2022-05-28 2:27 a.m., Stefan Nedeljkovic wrote:
> > One slight problem is when I use 2\measured{xheight} as the font size I
> > get an error. \measure works fine though.
>
> The old version expected direct input, not a \dimen. Try this:
>
>      \starttexdefinition setxheight [#1][#2]
>          \switchtobodyfont[#1, 12pt]
>          \scratchdimen=\dimexpr#2\relax
>          \switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen /
> tex.sp"1ex" * tex.sp"1em" .. "sp"}]
>      \stoptexdefinition
>
>      \definemeasure[xheight][2.5pt]
>
>      \starttext
>          \setxheight[adventor][10\measured{xheight}] Hello!
>      \stoptext
>
>
> -- Max
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220528/164826ac/attachment.htm>


More information about the ntg-context mailing list