dotnet / dotnet/winforms

Font scaling is not efficient for PMV2

Open
#14,032 0 comments 1 reaction 0 assignees View on GitHub
area-HDPI-PMv2 tenet-performance
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

https://github.com/dotnet/winforms/blob/9becf03cc9e364a90889672e1f383cd72568a4cb/src/System.Windows.Forms/System/Windows/Forms/Control.cs#L289

We currently create copies of `Font`s for every DPI for every Control when PMv2 is enabled. This is hugely inefficient as most Applications do not have a different font on every control.

This should, at a minimum, be coming from a weak referenced scaled Font cache.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.