[NTG-context] How to calculate the height of text of a certain width?

Rudolf Bahr quasi at quasi.de
Tue Mar 24 12:19:10 CET 2020


Hello dear All,

the following MWE works best:


\definelayer[LAY]
\starttext

\setlayerframed[LAY]
  [x=0pt,y=20pt]
  [frame=on,
   width=300pt,
   align={right,}]   % tolerant}]
  {\input ward }
 
\flushlayer[LAY]
\stoptext


Now, it could have a favourable effect on designing a page if the height of a text
of certain width could be calculated in advance, depending of the font.
Is there a way?

As I fear, TeX's means "\setbox" woun't work with aligned texts.

Best wishes, remain healthy,
Rudolf


More information about the ntg-context mailing list