Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating mixed-height justified headlines?

I have a design that has a lot of three-line mixed-height headlines. Probably the easiest way to explain the look is with an example:

Example

(For the purpose of this, ignore the fact that the last line has two words.)

Everything's fully-justified, but the font-size and kerning change depending on the length of the word.

Is there any way of doing this with either JavaScript or CSS?

like image 646
aendra Avatar asked Mar 23 '26 17:03

aendra


1 Answers

I went through a boatload of libraries for this project, including:

  • FitText.js
    • Couldn't get it to work so that different lines are different sizes (I.e., justified, but not mixed-height).
  • BigText.js
    • Couldn't get it to work at all.
  • Stretch
    • I forget the issue with this, but it didn't work for my purposes.
  • Winner: SlabText
    • This is what I ended up using, and it works fantastic.
like image 73
aendra Avatar answered Mar 25 '26 06:03

aendra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!