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
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to