Skip to content

Font style does not work in Application.SetDefaultFont() when the text scale value is bigger than 100% in OS #4978

@John-Qiao

Description

@John-Qiao
  • .NET Core Version:

    .NET SDK 6.0.100-preview.5.21275.4

  • Have you experienced this same bug with .NET Framework?:

    No

More Info:

This issue occurs in other System.Drawing.FontStyle enum values too, like Bold, Strikeout and Underline...

Problem description:

The font style is not Italic for controls in form.
Actual
ReproSteps

Expected behavior:

The font style should be Italic in form, like it works when text scale is 100%.
Expected

Minimal repro:

  1. Open the attached TestApp.zip project in VS, run it and check the font style of buttons. -- Font style is Italic in this time.
  2. Stop the project, and open the Display setting in OS, then change the text scale(Make text bigger) to 150% and click Apply option.
  3. Run project again and observe the font style in controls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 bugProduct bug (most likely)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions