[NTG-context] Is it possible to automatically determine font size to fit text to a given space?

Wolfgang Zillig wolfgang.zillig at student.kuleuven.be
Fri Dec 2 16:18:40 CET 2005


Could't it be done by metapost?

Wolfgang

Hans Hagen schrieb:

> Daniel Pittman wrote:
>
>> Hints about that, or a native TeX method[1], would be very much
>> appreciated.  At the moment it is a relatively slow process of manual
>> trial and error.
>>  
>>
> this is something tex is pretty good at and it runs as fast as normal
>
> how does your current code look? (the solution depends a bit it); 
> think of something
>
> \doloop{
>  \setbox\scratchbox=\vbox
>     {the content of the label}
>   \ifx\ht\scratchbox>10cm
>       \switchtobodyfont[small]   \else
>       \unvbox\scratchbox
>       \exitloop
>   \fi
> }
>
> Hans
> _______________________________________________
> ntg-context mailing list
> ntg-context at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>



More information about the ntg-context mailing list