TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Balancing text for better readability

208 pointsby dave1010ukover 12 years ago

16 comments

mcargianover 12 years ago
I think it's odd that a post about readability has grey text (#686868) on a white background. Next to the black screen grabs the text is very light.
评论 #5188366 未加载
评论 #5188587 未加载
评论 #5188547 未加载
评论 #5190292 未加载
评论 #5188502 未加载
评论 #5188225 未加载
评论 #5188177 未加载
评论 #5190419 未加载
评论 #5188618 未加载
评论 #5188396 未加载
评论 #5193221 未加载
评论 #5189143 未加载
dpcxover 12 years ago
Why not just use the Knuth-Plass algorithm as implemented in <a href="http://www.bramstein.com/projects/typeset/" rel="nofollow">http://www.bramstein.com/projects/typeset/</a>?
评论 #5188642 未加载
评论 #5188412 未加载
评论 #5189171 未加载
pjungwirover 12 years ago
For subtitles and ledes, or really anything larger than the main body text, I actually prefer the &#60;br/&#62; solution. It's important not only to break in a pleasing shape, but also to break at grammatically-sensible points. So it's better to say:<p><pre><code> Take the blue car to the shop </code></pre> vs<p><pre><code> Take the blue car to the shop </code></pre> or<p><pre><code> Take the blue car to the shop</code></pre>
评论 #5189452 未加载
psadriover 12 years ago
This is a very legitimate addition to CSS. I bet we will see it in a future release. It makes a lot of sense for headings. I hope it will not get abused for other text blocks (but I am sure it will).
wnoiseover 12 years ago
For plain text, see "par", a much nicer version of "fmt".<p><a href="http://www.nicemice.net/par/" rel="nofollow">http://www.nicemice.net/par/</a>
fudged71over 12 years ago
Chrome still doesn't support CSS3 hyphenation. I wish they would, because it has a huge impact in web typography. <a href="http://caniuse.com/css-hyphens" rel="nofollow">http://caniuse.com/css-hyphens</a>
评论 #5189775 未加载
decklinover 12 years ago
I long for something that would just wrap all big paragaphs of text at 70-ish characters without hacking at element widths (I've tried user stylesheets, scripts... nothing satisfactory). If this were implemented, I imagine it would be easier to do that.<p>(For example, the first line of the first paragraph of the post renders as 134 characters on my screen. Maybe I am just old, but I find this hard to read.)
评论 #5188972 未加载
评论 #5188977 未加载
fernlyover 12 years ago
The Knuth optimal balancing algorithm is implemented in C in the Gnu Core Utilities program "fmt" -- see <a href="http://www.gnu.org/software/coreutils/" rel="nofollow">http://www.gnu.org/software/coreutils/</a> -- and is plenty fast enough for a browser to render text.
dylangs1030over 12 years ago
Yes, the website is ironically displaying text in an inconvenient way for a bunch of users.<p>But as for the content itself: why not just use left align justify? I understand that justify <i>asymmetrically</i> inserts spacing to apply a balanced center throughout, but is this <i>really</i> an issue? In what context are users so hypersensitive to readability issues that they need the justify spacing to not only balance the entire text but evenly balance each space within the text in reference to one another?<p>Pardon me for not finding this significant. I just think it's a bit anal when we have a solution already.
评论 #5190609 未加载
lnanek2over 12 years ago
Ugh, I really hate newspapers and the like that stretch out words and letters randomly just to have it make a perfect block. Random spacing to meet your criteria of prettiness does not improve readability. This person centers too much is his problem, I think. Just left align, read down the page with every line starting in the same spot, stop when done. Yay. Most web readers don't even read every word anyway, they skim, and you are producing something anti-skimmable by not keeping a nice solid left line where all the text starts wherever possible.
评论 #5188702 未加载
评论 #5188682 未加载
评论 #5196315 未加载
sc0rbover 12 years ago
Wow. Grey text on a white background. This is really annoying to read on a matte screen.<p>A little ironic given the subject matter?
milliamsover 12 years ago
The simplest solution to a similar problem (a single hanging word in a headline) that I've seen is to replace the 'space' between the last two works with an &#38;nbsp; This forces the last two words to stay together as a unit. It can be automated with a simple piece of ECMAScript.
评论 #5188527 未加载
antirezover 12 years ago
Any list of quality web typography resources accessible for programmers? Thanks
评论 #5189597 未加载
评论 #5257485 未加载
spenninoover 12 years ago
Wouldn't it be easier and give you more editing control to just put text in a &#60;pre&#62; element? Seems like it would be hard to algorithmically determine what will visually look good
评论 #5188541 未加载
评论 #5189411 未加载
muglugover 12 years ago
Lovely idea. One might also consider the special case of two centered lines, where many have an aesthetic desire for the first to be longer than the second.
ssesover 12 years ago
It's a good idea, but it needs to be fleshed out more for internationalization. Even for the given case, English, what exactly constitutes a word?
评论 #5203550 未加载