libshumate's vector tile renderer now supports labels! https://www.jwestman.net/2022/06/18/labelling-maps-is-surprisingly-hard.html
@flyingpimonster
An algorithm idea: draw the river as a thick, rounded line (run a circular kernel), extract one border of that line.
That results in a rounded, smoothed line next to the river.
Now draw text on it - as long as the text does not overlap the actual river, letters won't overlap either due to the softened turns. It did not dismiss any river geometry, so it will track river shape closely.
Computational cost may be a problem compared to just dropping segments of a polyline.
@flyingpimonster I like how you explained labels on rivers. I think the problem with too much detail is that letters end up overlapping, as a secondary consequence of too high of a fractal dimension http://fractalfoundation.org/OFC/OFC-10-4.html
Overlap comes from considering letters on a line rather than within a strip, so I'd probably try to do something about that.