Open ericdum opened 11 years ago
Can you better describe the problem you're trying to fix? Also, we now require educed test cases. It looks like you're just injecting a bunch of CSS that may or may not be necessary.
Please take a look the example.html.
I just added a longer text:
<h1 id="fittext4">Squeeze with FitText For Long String</h1>
And execute following code:
$("#fittext4").fitText();
Before this version, the text will break the line.
This version will automatically fit the width.
Just put it on the browser and check it out.
:+1: I was looking for this. Thanks
FitText was designed to work with multiple lines of text. So I'm not really sure that this fits that use case. Maybe putting this functionality behind a noBreak: true
option is something to consider.
no matter what the text is, do fitText(), it's will fit to 100% width automatticly