I would suggest that this feature could easily be implemented using a
separate script--possibly using the Widont technique, which adds a non-
breaking space before the last word of every paragraph. Then all that
would be needed would be for cufon to treat words separated by a non-
breaking space as one word and wrap them both in one span element.
Unfortunately, this is not how it behaves currently, but may I suggest
that the project maintainer consider implementing this change?
On May 7, 8:29 am, Matt McManus <
mattmcma...@gmail.com> wrote:
> The white-space: nowrap is a great idea. I can't believe I've never
> used that.
>
> Issue has been created:
http://github.com/sorccu/cufon/issues#issue/20
>
> On May 6, 2:35 pm, Simo Kinnunen <
sor...@gmail.com> wrote:
>
> > Hi Matt,
>
> > Interesting. I guess it would be possible to add basic support for
> > widows, but it wouldn't work in the following situation (imagine a
> > line break after the word "few"):
>
> > <h1>text text text ...... last <strong>few</strong> words</h1>
>
> > Do you think this would be an acceptable limitation?
>
> > About the implementation: it would be better to use white-space:
> > nowrap than display: block/inline-block, because it's less likely to
> > break the layout. But an even better solution would be to simply use
> > one canvas for the last two words.
>
> > Also, would you mind creating a feature request over at our issue
> > tracker (
http://github.com/sorccu/cufon/issues)?It'sthe best way to