image-rs / imageproc

Image processing operations
MIT License
758 stars 149 forks source link

clamp coverage value in text.rs between 0.0 and 1.0; #566

Closed asibahi closed 7 months ago

asibahi commented 7 months ago

Very minimal change. I had copied the code from this crate to use in my own projects, and found out that sometimes ab_glyph gives a higher coverage value than 1.0 when there are overlapping glyphs (like in Arabic.) The same change worked in my code. You can find the relevant issue here: https://github.com/alexheretic/ab-glyph/issues/101

theotherphil commented 7 months ago

Thanks!