No description, website, or topics provided.
JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
src
.gitignore
README.md

README.md

poster

Create BIG, BOLD poster text with little effort. In essence, this plugin resizes text to best fit it's parent container. The algorithm will first calculate the ideal number of characters per line based on the ammount of text and the vertical space available. It will then split the text into phrases and resize them accordingly. This plugin is based on slabText, which itself is based on the slabtype algorithm. Poster, however, takes into account the container's height.

HTML:

<div id="headline">I love deadlines. I like the whooshing sound they make as they fly by. -Douglas Adams</div>

CSS:

#headline {
  width: 400px
  height: 600px
}

JS:

$('#headline').poster()

Available settings:

$('#headline').poster(
    padding: false              // Force padding
    wrapAmpersand: true         // Wrap ampersand with a div
    container: false            // Force containing element
)