Open ghost opened 3 weeks ago
Ouch! This is almost certainly a swash problem. Thanks for reporting. I’ll look into it.
This should be fixed with swash 0.1.17.
Thanks @dfrg!
@petersupansectra please test this after using cargo update to get the new swash crate
Description
With some fonts the rendering looks as if the first pixels and the last pixels (vertically) are stretched, which results in broken rendering. I could reproduce this issue with the "Algerian" font and the "Stencil" font in the rich-text example.
Steps to reproduce
Take the "rich-text" example and e.g. replace the line which sets the attributes for comic-sans with
let comic_attrs = attrs.family(Family::Name("Algerian")).stretch(cosmic_text::Stretch::ExtraCondensed);
orlet comic_attrs = attrs.family(Family::Name("Stencil"));
How does it look like
This looks especially spectacular with the "Algerian" font. Algerian:
but is also visible with "Stencil"
Stencil:
![image](https://github.com/pop-os/cosmic-text/assets/127496391/59d3fd50-426c-4437-82e4-9b512822a0da)