dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.42k stars 984 forks source link

FontConverter never generates parameter for GdiVerticalFont value #8838

Closed Tanya-Solyanik closed 1 year ago

Tanya-Solyanik commented 4 years ago

Description

This is ported from https://github.com/dotnet/winforms-designer/issues/2350

Winforms Designer scenario:

Create a Winforms .Net Core application. Select Form1 in the property window. Expanf Font property for the Form. Change the GdiVerticalFont property value from False to True under the Font node.

Result: The following constructor is generated: this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);

Expected: In .Net Framework, we were generating: this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)), true); where the last parameter is GdiVerticalFont

Configuration

Windows

Regression?

regression from the .NET Framework

Other information

This is cause by a change in FontConverter, because it stopppped generating constructor with GdiVertiaclFont parameter. .NET Core: https://source.dot.net/#System.Drawing.Common/System/Drawing/FontConverter.cs,88 .NET Framework: https://referencesource.microsoft.com/#System.Drawing/commonui/System/Drawing/FontConverter.cs,248

ghost commented 4 years ago

Tagging subscribers to this area: @safern, @tannergooding, @jeffhandley See info in area-owners.md if you want to be subscribed.

safern commented 3 years ago

@Tanya-Solyanik @JeremyKuhne is this blocking a designer scenario and do we need to get this fixed for 6.0.0?

maryamariyan commented 3 years ago

We are moving this to 7.0 since it doesn't seem like a blocking scenario.

ViktorHofer commented 2 years ago

Triage: Let's look at this again in 8.0 to unblock the scenario when using the properties in the designer.

Ashley-Li commented 1 year ago

Verifed this issue in the latest .NET 8.0 Build: 8.0.100-preview4.23330.11, it was fixed. Now the following constructor is generated: Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 1, true); where the last parameter is GdiVerticalFont. 8838_verify

Nora-Zhou01 commented 1 year ago

Verified it in VS insertion PR with .Net 8 Preview 4 test pass build: 8.0.0-preview.4.23253.2, issue was fixed as above test result.