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

Gerben Wierda Gerben.Wierda at rna.nl
Sun Dec 4 10:40:29 CET 2005


While we're at it. can I get the name of the current font somehow?

G

On Dec 2, 2005, at 15:02, Hans Hagen wrote:

> 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