Awesome, thank you very much Max!

On Sat, May 28, 2022 at 8:49 AM Max Chernoff <mse...@telus.net> wrote:

> > How would one specify the font size in LMTX, but via x-height?
>
> You could try this:
>
>      \starttexdefinition setxheight [#1][#2]
>          \switchtobodyfont[#1, 12pt]
>          \switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" *
> tex.sp"1em" .. "sp"}]
>      \stoptexdefinition
>
> Demo:
>
>      \starttexdefinition setxheight [#1][#2]
>          \switchtobodyfont[#1, 12pt]
>          \switchtobodyfont[#1, \cldcontext{tex.sp"#2" / tex.sp"1ex" *
> tex.sp"1em" .. "sp"}]
>      \stoptexdefinition
>
>      \define[1]\sample{%
>          \setxheight[#1][10pt] Hello%
>      }
>
>      \setuppapersize[letter, landscape]
>
>      \starttext
>          \dontleavehmode\rlap{\vrule width\textwidth height 10.5pt depth
> -10pt}%
>          \processcommalist[modern, pagella, termes, heros, bonum, scholas,
> adventor, cursor, chorus, dejavu]\sample
>      \stoptext
>
> This is kind of a hacky solution though. It works reasonably well,
> although there's likely a better (perhaps builtin?) way to do this.
>
> -- Max
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to