-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Managed DWrite] Migrate part of DWriteTypeConverter to managed #9902
base: main
Are you sure you want to change the base?
[Managed DWrite] Migrate part of DWriteTypeConverter to managed #9902
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Hopefully in a few weeks we'll have CsWin32 and xunit support in place which will make changes like this possible without pre-emptive test passes.
// We do not support Natural Metrics mode in WPF | ||
// However, the build system complained about not having an explicit case | ||
// for DWRITE_TEXT_MEASURING_METHOD_USE_DISPLAY_NATURAL_METRICS | ||
case DWRITE_MEASURING_MODE.DWRITE_MEASURING_MODE_GDI_NATURAL: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: slightly better to fall through here and only have one throw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to keep the case for the comment but I didn't think about just merging case DWRITE_MEASURING_MODE.DWRITE_MEASURING_MODE_GDI_NATURAL
with default
. I pushed a commit the just merges the 2 and removes the duplicate throw.
@JeremyKuhne Do you mind reviewing #6260 as well ? It's in the same vein. |
Contributes to #5305
Description
Migrate part of DWriteTypeConverter to managed. I also removed some dead code from my previous Managed DWrite PR. I changed the name of
DWriteTypeConverter
in PresentationCore toDWriteTypeConverterEx
because it conflicted with the one in DirectWriteForwarder.Customer Impact
It might be faster and should allow better support of trimming and the support of NativeAOT once everything is migrated to C#.
Regression
No.
Testing
Local testing.
Risk
Low.
Microsoft Reviewers: Open in CodeFlow