simplefocus / FlowType.JS

Web typography at its finest: font-size and line-height based on element width.

Home Page:http://simplefocus.com/flowtype/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Fit on one line

tigerhawkvok opened this issue · comments

When calling flowtype, it'd be great to be able to do

$("#id").flowtype({
onOneLine:true
});

To resize the text selected to fit exactly on one line in its parent element.

Hey Tiger,
What you are looking for is FitText.js, they have some sort of compressor values you can mess around with to get big headlines just how you like them. http://i.imgur.com/tzY7AsF.jpg I ran into same problem as you where in flowtype i couldn't keep it at 1 line but in fittext messing around with the "2.02" number a few times locked it to 1 line. It's a kinda like a scale amplifier: $(".intro-h1").fitText(2.02, { minFontSize: '15px', maxFontSize: '100px' });

BUT!!! do NOT use FitText for regular text, that is where FlowType.js shines and should rightfully be used.