WebKit now supports the text-wrap: pretty
CSS property, improving typography for justified text. This property optimizes word spacing and hyphenation to produce more visually appealing and readable justified text, addressing issues like excessive whitespace or too many hyphenated lines. text-wrap: pretty
aims to prioritize aesthetics and comprehension by intelligently balancing these typographic elements, leading to a more refined and professional look for justified text on the web. It provides a simple way for developers to enhance the appearance of justified text blocks without resorting to complex manual adjustments or JavaScript workarounds.
"Kerning, the Hard Way" details the painstaking process of manually kerning a font, specifically the author's Octet typeface. The post emphasizes that proper kerning isn't simply about consistent spacing, but about creating optically even gaps between letter pairs, which often requires asymmetrical adjustments. This involves meticulous visual examination of each pair and subtle nudging, a task complicated by the impact of neighboring letters and the varying shapes within a typeface. Ultimately, the article highlights the significant time investment and subjective judgment required for quality kerning, portraying it as a demanding yet essential step in font design for achieving visual harmony and readability.
HN users generally praised the article for its clear explanation of kerning and the complexities involved. Several commenters shared their own experiences with kerning, highlighting its subjective nature and the challenges of achieving optimal results. Some discussed the role of experience and "eye" in kerning, while others mentioned the usefulness of tools like kerning tables. A few users debated the merits of metric vs. optical kerning, and the impact of different rendering engines. One compelling comment thread explored the limitations of automated kerning and the importance of considering context and surrounding characters. Another pointed out the significance of kerning in non-Latin scripts, adding another layer of difficulty.
Summary of Comments ( 137 )
https://news.ycombinator.com/item?id=43622703
Hacker News users generally praised the new
text-wrap: pretty
CSS property for addressing a long-standing typography issue with justified text. Several commenters pointed out the benefits for accessibility, particularly for users with dyslexia or other cognitive differences, as the more consistent spacing makes text easier to parse. Some expressed concern about potential performance implications, especially with large blocks of text, but others downplayed these concerns given modern browser optimizations. A few users wished for further refinements, like hyphenation control or integration with existing text justification methods, but overall the sentiment was positive, viewing the feature as a significant improvement for web typography. The discussion also touched upon the subtle differences betweentext-wrap: pretty
andtext-justify: distribute
, with some clarifying the distinct functionalities and advantages of each.The Hacker News post "Better typography with text-wrap: pretty" generated several comments discussing the new CSS property
text-wrap: pretty
. Many commenters express enthusiasm for the feature, viewing it as a significant improvement for web typography.Several commenters highlight the practical benefits of
text-wrap: pretty
, especially for East Asian languages. They point out how it intelligently handles word breaks and spacing, creating a more visually appealing and readable layout. One commenter specifically mentions the improvement in handling punctuation marks, which often caused awkward line breaks in the past. The enhanced control over widows and orphans, preventing single lines of text at the beginning or end of paragraphs, is also mentioned as a positive aspect.Some comments delve into the technical details of the implementation, discussing how it differs from existing methods of achieving similar results. One commenter mentions the challenges of balancing typographic beauty with performance, and praises the WebKit team for finding a good compromise. Another explains how
text-wrap: pretty
goes beyond simply preventing widows and orphans, and also considers other typographic nuances for a more refined appearance.The discussion also touches upon the broader implications of this feature for web design. Some commenters anticipate wider adoption of advanced typographic techniques now that they are easier to implement. Others express hope that this will encourage a greater focus on typography in web development overall.
A few commenters raise questions and concerns. One asks about the potential impact on accessibility, particularly for users with dyslexia. Another wonders about browser compatibility and the timeline for wider adoption.
Overall, the comments reflect a positive reception to the
text-wrap: pretty
property. Commenters see it as a valuable addition to CSS that will improve the quality of web typography, particularly for East Asian languages, by providing a more elegant and refined way to handle text flow and line breaks. While some practical questions remain about implementation and accessibility, the general sentiment is one of excitement and anticipation for its wider adoption.