-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
Problem description:
FontNameEditor font preview is showing less characters.
For example on the below screenshots:
| Font | .NET 4.7.2 | .NET Core 3.0 |
|---|---|---|
| Arial Black | ab | a |
| Forte | abc | ab |
| Lucida Handwriting | ab | a |
Actual behavior:
| .NET 4.7.2 | .NET Core 3.0 |
|---|---|
![]() |
![]() |
🤔 ink It is possible the change may related to the change of the default font in #656.
Expected behavior:
We show the same amount of characters as with .NET FX.
It looks like we can achieve the same render by reducing the fontSize in DrawFontSample:
private static void DrawFontSample(PaintValueEventArgs e, FontFamily fontFamily, FontStyle fontStyle)
{
float fontSize = (float)(e.Bounds.Height / 1.2);
using (var font = new Font(fontFamily, fontSize, fontStyle, GraphicsUnit.Pixel))
{
e.Graphics.DrawString("abcd", font, SystemBrushes.ActiveCaptionText, e.Bounds);
}
}
Minimal repro:
- Run WinformsControlsTest in .NET 4.7.2 and .NET 3
- Compare
Metadata
Metadata
Assignees
Labels
No labels

