Hacker News new | ask | show | jobs
by limmeau 4858 days ago
The thread at SO discusses this; both glyph positions and glyph shapes are important for a river to become noticeable.
2 comments

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.