[NTG-context] “bodyfont %s is defined (can better be done global)”

Wolfgang Schuster schuster.wolfgang at googlemail.com
Sun Jun 3 17:12:27 CEST 2012


Am 03.06.2012 um 16:27 schrieb Philipp Gesang:

> Hi Wolfgang!
> 
> ···<date: 2012-06-03, Sunday>···<from: Wolfgang Schuster>···
>>> ········································································
>>> \definebodyfontenvironment[42.0pt] %% a dozen times
>>> \starttext
>>> \switchtobodyfont[42.0pt]          %% hundreds of times
>>> %\switchtobodyfont[42pt]           %% <- this works, though
>>> foo
>>> \stoptext
>>> ········································································
>>> 
>>> Which then results in this warning:
>>> ········································································
>>> fonts           > bodyfont 42.0pt is defined (can better be done global)
>>> ········································································
>>> 
>>> Although the size has been „defined“. My problem appears to be
>>> that I’m abusing dimensions as makeshift floats to calculate
>>> relative font sizes, interlinespace etc. via \dimexpr.
>> 
>> ???
> 
> It’s about decrementing font size and interlinespace until the
> content fits a predefined box.
> https://bitbucket.org/phg/context-stellen/src/3568dc7470fa/tex/context/third/bstellen/t-bibelstellen.mkiv#cl-158


Look at the definition for \FittingText in supp-fun.mkiv:

\starttext
\ruledvbox{\FittingText{\hsize}{100pt}{Serif}{16pt}{1pt}{1}{\raggedright\input knuth\par}}
\stoptext

Wolfgang


More information about the ntg-context mailing list