zachleat/BigText — Issue #14: Minimum font size, or minimum div width
Author: davecoffin
Created: 2011-12-06 20:27:02+00:00
State: open

So...this plugin is awesome. And I'm psyched to bake it into a project I'm working on. But, I'm running into a problem. Let me first outline what I'm trying to do.

I have a div that will contain text that will be provided by a user, so I won't know how long it will be. So observe these examples:

example 1:
User-Provided Text: Viva La Vida

In this example (1), the text would be large if the div were like 600px. Awesome. If it shrinks down to 200px, the text will be small, but readable. Awesome.

example 2:
User-Provided Text: This Is The Name Of an Album Title, And It's Really Long, Cuz I'm A Really Indie Artist.

In this example (2), the text would be readable at 600px like this: http://cl.ly/CO5e
Awesome.
But if the container shrunk down to say, 500px, here's what it would like: http://cl.ly/CO0y
Not awesome.

So my thought process is, in options there should be something like minfontsize: BigText.DEFAULT_MIN_FONT_SIZE_PX
that say if you set to 12, the font size would shrink no further and just wrap the line at that minimum text. So whatever div width calculates a size 12 font, if the div shrinks below that the font-size is frozen at 12 and just wraps normally, or responds to text-overflow or whatever. Does that make sense?

So I'm wondering if I'm just missing an option for this or spacing on an easy workaround. Thanks for taking the time to respond!