Conversation
| public: | ||
| DxFontInfo() noexcept; | ||
|
|
||
| DxFontInfo(std::wstring_view familyName, |
There was a problem hiding this comment.
I'm not sure whether this should be familyName or faceName. Seems to me there are familyName & faceName in the GDI font info, but only familyName in DWrite?
There was a problem hiding this comment.
There are face names on the IDWriteFont::GetFaceNames method... the problem tends to be that there are multiple of them depending on the locale or language or variations and GDI just sort of glosses over that. I think we should just continue to focus on the family name until proven otherwise.
| public: | ||
| DxFontInfo() noexcept; | ||
|
|
||
| DxFontInfo(std::wstring_view familyName, |
There was a problem hiding this comment.
There are face names on the IDWriteFont::GetFaceNames method... the problem tends to be that there are multiple of them depending on the locale or language or variations and GDI just sort of glosses over that. I think we should just continue to focus on the family name until proven otherwise.
|
Huh...the trick See microsoft/azure-pipelines-agent#1270 (comment) . I don't honestly know what she meant by saying "Azure DevOps honors the [skip ci] commands on CI builds as the change being built has already been merged" |
PankajBhojwani
left a comment
There was a problem hiding this comment.
Some of the unit tests seem to be failing, other than that this looks good to me!
|
OK I have no idea how & why there tests has anything to do with my code: |
The failed tests all look like Where |
|
The common thing in the unit tests looks like a call to
So at a guess, there's some code-path where some initialisation never happens and hence some value is 0.f. It's being hit by the unit tests' very minimal initialisation, that you aren't seeing in actual testing when you run WT. |
|
wow thanks @TBBle for the investigation. I'll get to this PR later and found out why. I promise. |
DHowett
left a comment
There was a problem hiding this comment.
blocking while reviewing since this has 2 s/o
src/renderer/dx/DxFontInfo.h
Outdated
| bool _didFallback; | ||
| }; | ||
|
|
||
| struct DxFontInfoHash |
There was a problem hiding this comment.
My personal preference is that we properly extend std::hash; it means that we can use the STL containers with less customization, and perhaps that leads to a higher likelihood that they will be deduplicated as "identical code" 😄
|
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This commit adds support for bold text in DxRenderer. For now, bold fonts are always rendered using DWRITE_FONT_WEIGHT_BOLD regardless of the base weight. As yet, this behavior is unconfigurable. References Previous refactoring PRs: #9096 (DxFontRenderData) #9201 (DxFontInfo) SGR support tracking issue: #6879 Closes #109
Fixes the performance regression caused by DxFontInfo. DxFontInfo introduced in #9201
|
🎉 Handy links: |
This PR Introduces
DxFontInfoto simplify the logic inDxFontRenderData.DxFontInfoaims to be the DWrite equivalent ofFontInfo&FontInfoBasein GDI. It encapsulates the needed information torepresent a displayable font face. It also provides the ability to
resolve a font face based on the available fonts on the system.
References
This is a follow-up of #9096.
Initial Italic support was introduced by #8580.
The motivation behind this is to support bold & bold-italic text in
Windows Terminal.