Skip to content

Completely switch to ScalingSWTFontRegistry #312

Open
eclipse-platform/eclipse.platform.swt
#2212
@HeikoKlare

Description

@HeikoKlare

The DefaultSWTFontRegistry was introduced to preserve the existing font creation behavior of SWT on Windows. The added ScalingSWTFontRegistry was only used in monitor-specific scaling scenarios because they were still experimental and that new registry was not thoroughly tested yet.

By now, monitor-specific scaling is there for quite a while and even enabled as default now. The ScalingSWTFontRegistry proved to work fine, so there is basically no need for the DefaultSWTFontRegistry anymore. In addition, that one does not allow for creating fonts at different zooms, which will be particularly necessary for disabling autoscaling of widgets.

Thus, we should change the SWTFontProvider to use the ScalingSWTFontRegistry always by default, not dependent on monitor-specific scaling.

I propose to keep the DefaultSWTFontRegistry and to add a system property to use it instead of the ScalingSWTFontRegistry. At the same time, we should deprecate the DefaultSWTFontRegistry for removal in 2 years. Even though it's not public API and thus does not require an official deprecation, this allows to temporarily switch back to the existing font creation behavior in case some RCP product faces issues with the new font registry.

Metadata

Metadata

Assignees

Labels

HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

Type

No type

Projects

Status

👀 In Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions