4 ms·
Add hyphenation, protrusion, and character expansion to the mix and I'm interested in seeing how these can be handled.
by kccqzy 8y ago
Add hyphenation, protrusion, and character expansion to the mix and I'm interested in seeing how these can be handled.
- bradbeattie 8y agoThe problem might be made notably more difficult when accounting for non-monospaced fonts and rivers: https://en.m.wikipedia.org/wiki/River_(typography) https://en.m.wikipedia.org/wiki/River_(typography)
- wnoise 8y agoPenalizing rivers would complicate things, but non-monospaced fonts are handled with only small modification.
- Mikhail_Edoshin 8y agoRivers are especially hard to detect because to model what people see the program would have to look at actual shapes of the letters. Two similar configurations of character boxes may or may not give the appearance of a river depending on which characters are in these boxes. E.g. if a diagonal river passes along the long stem of "y", the shape of the letter contributes to the illusion, but if the river goes along the short stem, them the longer stem will visually work against it.
- mort96 8y agoWhen adding hyphenation, one should ideally start thinking of internationalization, because different languages have different rules for hyphenation. In Norwegian, for example, one should generally add a hyphenation between each stem (for example, our word for fruit salad is "fruktsalat"; that should be hyphenated as "frukt-salat", not as "fruktsa-lat"). It's really jarring to read Norwegian text hyphenated by an algorithm which uses American rules for hyphenation.