microsoft / microsoft/WindowsAppSDK
DWriteCore generates errors for SemiBold font weight for some fonts
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### Describe the bug
This issue was independently discovered by [me](https://github.com/microsoft/microsoft-ui-xaml/issues/10169) and [him](https://github.com/microsoft/microsoft-ui-xaml/issues/10105), and it is caused by changes in the way DWriteCore is used starting from WinUI3 1.6. In other words, this issue has always existed in DWriteCore, but WinUI3 1.6 exposed it. WinUI3 1.6 added the following code: https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/1.6.0/src/dxaml/xcp/pal/win/DWriteFontFamily.cpp#L50-L75
### Steps to reproduce the bug
Set the font of the TextBlock to Microsoft Yahei UI (requires Chinese language pack), and set the width to SemiBold.
### Expected behavior
The text appears thicker than normal.
### Screenshots
_No response_
### NuGet package version
None
### Packaging type
Packaged (MSIX)
### Windows version
_No response_
### IDE
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked DWriteFontFamily.cpp section at lines 50-75 and reproduce the issue using a TextBlock set to Microsoft Yahei UI with SemiBold weight. Investigate the DWriteCore behavior exposed by that usage and verify the fix by confirming the font renders thicker than normal without generating errors.
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
- Needs clarification
- Newbie friendliness
- 35/100