Skip to content

Artifacts due to rounding errors in StyledText #251

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

Open
HeikoKlare opened this issue Feb 26, 2025 · 0 comments · May be fixed by eclipse-platform/eclipse.platform.swt#2076
Open

Artifacts due to rounding errors in StyledText #251

HeikoKlare opened this issue Feb 26, 2025 · 0 comments · May be fixed by eclipse-platform/eclipse.platform.swt#2076
Assignees
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Milestone

Comments

@HeikoKlare
Copy link
Contributor

HeikoKlare commented Feb 26, 2025

Due to SWT auto-scaling, we still have artifacts due to rounding errors in StyledText, as areas are not rendered consistently.

In my opinion, it is wrong to use auto-scaling for custom-rendering a canvas like in StyledText, as TextLayout is only based on fonts and their sizes and needs to calculate around the SWT auto-scaling functionality. So maybe we should try to apply a static zoom concept like for GEF also for StyledText (see #220).

See also #196 (comment):

Even with eclipse-platform/eclipse.platform.swt#1762, we still have artifacts in StyledText, e.g.
Image

We also still have some offset between the lines as you can see when selecting text:

Image

All screenshots taken at 175% primary zoom.

@HeikoKlare HeikoKlare added this to HiDPI Feb 26, 2025
@HeikoKlare HeikoKlare converted this from a draft issue Feb 26, 2025
@HeikoKlare HeikoKlare added SWT Issue for SWT HiDPI A HiDPI-Related Issue or Feature labels Feb 26, 2025
@HeikoKlare HeikoKlare added this to the 4.36 M1 milestone Feb 26, 2025
@fedejeanne fedejeanne modified the milestones: 4.36 M1, 4.36 M2 Apr 16, 2025
@ShahzaibIbrahim ShahzaibIbrahim self-assigned this Apr 28, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🔖 Ready: Atomic to 🏗 In Work: Short in HiDPI Apr 28, 2025
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🏗 In Work: Short to 👀 In Review in HiDPI Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Projects
Status: 👀 In Review
Development

Successfully merging a pull request may close this issue.

3 participants