2 ms·
The justified alignment looks sub-par in places, like in the middle of the first paragraph of the example pages. Flush left alignment normally is the better opt
by mxfh 10y ago
The justified alignment looks sub-par in places, like in the middle of the first paragraph of the example pages.
Flush left alignment normally is the better option, if you don't have a hyphenation engine.
Browser inserted Soft-Hyphens could fix this, but since they are language dependent browser support is spotty:
https://developer.mozilla.org/en/docs/Web/CSS/hyphens#Suggesting_line_break_opportunities https://developer.mozilla.org/en/docs/Web/CSS/hyphens#Sugges...
By itself most browsers can break soft-hyphens pretty reliable, but they have to be generated first:
See https://github.com/mnater/Hyphenator https://github.com/mnater/Hyphenator or https://github.com/bramstein/hypher https://github.com/bramstein/hypher
- NoGravitas 10y agoIt really baffles me that some formatting engines require that soft-hyphens be pre-inserted. For eBooks, particularly. Apparently Kindle supports hyphenation only if the book has explicit soft-hyphens. Google Books doesn't seem to support it at all. Meanwhile, FBReader does a perfect job of hyphenating arbitrary ePubs. TeX has done it right since what, 1983? Yes, hyphenation is language-specific, but if your application is laying out blocks of text, a set of hyphenation tables is a basic part of language support.