News for hackers. Stuff that matters.
Re:"River" detection in text by taltman1 on Saturday February 23, 2013 @02:45AM (#5268916)
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.

Re:"River" detection in text by limmeau on Saturday February 23, 2013 @03:11AM (#5268965)
The thread at SO discusses this; both glyph positions and glyph shapes are important for a river to become noticeable.
Re:"River" detection in text by taltman1 on Sunday February 24, 2013 @10:48PM (#5277218)
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.
Re:"River" detection in text by GhotiFish on Saturday February 23, 2013 @04:00AM (#5269060)
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

Re:"River" detection in text by limmeau on Sunday February 24, 2013 @04:45AM (#5273588)
Is glyph width at base and top available to the layout algorithm? I don't know TeX that well.