Hacker News new | past | comments | ask | show | jobs | submit login

TeX uses a dynamic programming algorithm to perform its advanced hyphenation, which allows the text to fill the page "beautifully": http://en.wikipedia.org/wiki/TeX#Hyphenation_and_justificati...

If TeX is already using dynamic programming in order to improve the visual appearance of the words, I imagine that the same can be done for the space between the words without having to resort to image processing of the TeX document rendered as PDF.




The thread at SO discusses this; both glyph positions and glyph shapes are important for a river to become noticeable.


Whether vanilla TeX supports this out of the box or not, the TeX technology stack (including MetaFont and friends) has intimate knowledge of the size and shape of all glyphs. It is also not random as to which types of letters accentuate or obfuscate the border of a river in text. It is hard for me to believe that one cannot use dynamic programming to minimize the occurrence of rivers in the final layout, in the same way that TeX can minimize ugly borders using sophisticated hyphenation algorithms.


I think a false positive or two is worth it for glyph based analysis.

You could even do some sensible analysis per glyph.

width of base: A

vs width of top: V


Is glyph width at base and top available to the layout algorithm? I don't know TeX that well.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: