# [texhax] Command to find optimum font size of text.

David Carlisle d.p.carlisle at gmail.com
Thu Nov 12 13:25:09 CET 2015

On 12 November 2015 at 12:19, Gerard E. Seibert <jerry at seibercom.net> wrote:

> I seriously doubt that this can be done; however, I thought I would ask
> anyway.
>

>
> We have commands like "\vfill" and "\hrulefill", etcetera that fill a space
> to its maximum capacity. Now, I would like to know if something like that
> exists that can take a "text" phase and and enlarge or decrease its font
> size
> to fill a predefined space.
>
> Example, I have a table that has a cell that is 3 inches wide. I want the
> text I enter in that cell to appear as large as possible in that space. I
> can, of course, experiment until I find the optimum size; however, a
> function
> that did it automatically would be a time saver.
>
> As I stated, I don't believe anything like that exists, but it doesn't hurt
>
> --
> Jerry
>

\resizebox{3in}{!}{hello world}

would seem to do what you ask?

> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>

--
http://dpcarlisle.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20151112/3598197a/attachment.html>