dotnet / dotnet/winforms

Some letters are cropped in a textbox when Cascadia Code font is used

Open
#5,255 15 comments 0 reactions 0 assignees View on GitHub
Font
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

* .NET Core Version: 5.0.301
* Have you experienced this same bug with .NET Framework?: Yes

**Problem description:**

I'm observing cropping for some letters in WinForms textbox when Cascadia Code font is used. It looks like baseline is calculated incorrectly, but I cannot be sure. Compare the appearance of letters `g`,`q` and `j` with WPF renderer.
![screenshot](https://user-images.githubusercontent.com/1911626/125948508-12287558-47f4-44df-99db-3fcd7245b3f6.png)

**Expected behavior:**
The letters are rendered slightly higher, as in WPF renderer (although i'm not sure about umlauts)

**Minimal repro:**

1. Download and install Cascadia Code font from https://github.com/microsoft/cascadia-code/releases
2. Minimal application with WPF and WinForms versions [cascadiacode_sample.zip](https://github.com/dotnet/winforms/files/6830649/cascadiacode_sample.zip) (7kb). Build and run `cascadia_sample.csproj` .

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.