Skip to content

Artifacts due to rounding errors in StyledText #251

@HeikoKlare

Description

@HeikoKlare

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.

Metadata

Metadata

Labels

HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions