Closed Tanya-Solyanik closed 1 year ago
Tagging subscribers to this area: @safern, @tannergooding, @jeffhandley See info in area-owners.md if you want to be subscribed.
@Tanya-Solyanik @JeremyKuhne is this blocking a designer scenario and do we need to get this fixed for 6.0.0?
We are moving this to 7.0 since it doesn't seem like a blocking scenario.
Triage: Let's look at this again in 8.0 to unblock the scenario when using the properties in the designer.
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.
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.
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