Variable font height via tables in LaTeX

Posted by Hooked on Stack Overflow See other posts from Stack Overflow or by Hooked
Published on 2010-04-15T21:44:09Z Indexed on 2010/04/16 4:33 UTC
Read the original article Hit count: 370

Filed under:
|

I've been looking for a more elegant solution to the following typesetting problem. Consider those banners found in print media where the text is aligned like:

B    I    G        T   E   X   T
small text small text small text
m o r e    m e d i u m   t e x t

The font sizes are adjusted so that the height is scaled down for longer lines of text such that each line has equal width. I've written a small script that runs each line separately, compiles, crops the resulting pdf and then \includegraphics each in a table. This gives the desired effect but requires an both an outside script and pdfcrop (which only crops to a white bounding box). Since much of LaTeX is self-aware, I imagine it would be possible to have it recognize the width of a box and scale it appropriately so that any text fits exactly into the desired width.

Any thoughts or ideas on how a pure LaTeX implementation might work?

© Stack Overflow or respective owner

Related posts about latex

Related posts about typesetting