Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A TextBlock with the same font as a TextPresenter can be taller #17964

Open
jtcyacomb opened this issue Jan 13, 2025 · 0 comments
Open

A TextBlock with the same font as a TextPresenter can be taller #17964

jtcyacomb opened this issue Jan 13, 2025 · 0 comments

Comments

@jtcyacomb
Copy link

Describe the bug

Introduced in 11.1.5 / 11.2.0.

A TextBlock with the same font as a TextPresenter can be taller than the TextPresenter.

An example font which demonstrates the bug is Montserrat at 14 point.

When using the simple theme, this bug causes a TextBox to become taller when it has a visible watermark.

To Reproduce

Repo which demonstrates the bug.

In the repo's app, the TextBlock is taller than the TextPresenter. Also, when entering text into the TextBox, it becomes shorter.

Expected behavior

The heights of a TextBlock and a TextPresenter with the same font should be equal.

Avalonia version

11.1.5, 11.2.0, 11.2.3

OS

Windows

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants