Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken rendering with some fonts (vertical stretching of the last pixels) #268

Open
ghost opened this issue Jun 11, 2024 · 4 comments
Open

Comments

@ghost
Copy link

ghost commented Jun 11, 2024

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);
or
let comic_attrs = attrs.family(Family::Name("Stencil"));

How does it look like

This looks especially spectacular with the "Algerian" font.
Algerian:
image
but is also visible with "Stencil"
Stencil:
image

@dfrg
Copy link

dfrg commented Jun 14, 2024

Ouch! This is almost certainly a swash problem. Thanks for reporting. I’ll look into it.

@dfrg
Copy link

dfrg commented Jun 14, 2024

This should be fixed with swash 0.1.17.

@jackpot51
Copy link
Member

Thanks @dfrg!

@jackpot51
Copy link
Member

@petersupansectra please test this after using cargo update to get the new swash crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants