microsoft / microsoft/microsoft-ui-xaml
FontSize is not consistent between TextBlock and TextBox since WinAppSDK 1.6
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
Since the update to WinAppSDK 1.6, there is an inconsistency between TextBlock and TextBox controls regarding FontSize (and LineHeight when the FontSize is increased to match). This discrepancy results in misalignment and rendering issues, impacting the visual consistency of text across different controls.
### Steps to reproduce the bug
Create a new application with WinAppSDK 1.6 and add the following XAML. Observe that the FontSize does not match.
```XAML
```
### Expected behavior
FontSize of TextBlock and TextBlock should be consistent
### Screenshots
Red: TextBox
Blue: TextBlock
**WinAppSDK 1.5:**
**WinAppSDK 1.6:**
### NuGet package version
Windows App SDK 1.6.0: 1.6.240829007
### Packaging type
Packaged (MSIX), Unpackaged
### Windows version
Insider Build (xxxxx)
### IDE
Visual Studio 2022
### Additional context
_No response_
Contributor guide
Research direction
Reproduce the supplied XAML with Windows App SDK 1.5 and 1.6, comparing the TextBox and TextBlock rendering at FontSize 13 and the adjusted LineHeight. Trace the desktop control styling or rendering entry points responsible for these controls; done means matching font size and alignment without the reported discrepancy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100