News for hackers. Stuff that matters.
Re:The Importance of Manually Breaking Lines of Text by recursive on Sunday October 19, 2014 @03:17PM (#8479225)
This really only seems to work if you know the exact pixel width of the text in question. This would happen if you don't know the font being rendered or actual text in advance, which are both common occurrences in web development.
Re:The Importance of Manually Breaking Lines of Text by jrochkind1 on Sunday October 19, 2014 @05:10PM (#8479632)
Nah, you just don't need to know the exact pixel width.

For this example, you just need to know that the full sentence is likely to break some place on a large screen, and that the half-sentences are likely to fit without breaking on certain size screens.

Maybe you need the boundaries of likely maximum and minimum pixel widths, you certainly don't need to know the exact pixel width.

Re:The Importance of Manually Breaking Lines of Text by maxsavin on Sunday October 19, 2014 @03:17PM (#8479231)
This is more of a finishing touch, rather than something you would do initially.
Re:The Importance of Manually Breaking Lines of Text by recursive on Sunday October 19, 2014 @03:22PM (#8479252)
I'm talking about a deployed production app also.

Css has font fall-backs for a reason, and if you ever use them, that means you don't know which font is actually being rendered. Which is not to mention platform differences for rendering even the same fonts.

And if any part of the text is variable, which is pretty much the basis for web apps, then you have another problem.

It would be pretty great if there was something like <wbr> that you could use for this scenario.

Re:The Importance of Manually Breaking Lines of Text by maxsavin on Sunday October 19, 2014 @03:27PM (#8479270)
Sure you can certainly run into that issue in some cases, that's where your judgement as a developer should kick in.