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

Fix font axes/features not working on DPI change #12492

Merged
4 commits merged into from
Feb 16, 2022

Conversation

PankajBhojwani
Copy link
Contributor

@PankajBhojwani PankajBhojwani commented Feb 15, 2022

When the dpi is changed, call updateFont() instead of TriggerFontChange, this
means that we continue to use the existing font features/axes

Closes #11287

@ghost ghost added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Feb 15, 2022
@lhecker
Copy link
Member

lhecker commented Feb 15, 2022

I believe this issue is easier to fix if you replace this:

_renderer->TriggerFontChange(::base::saturated_cast<int>(dpi),
_desiredFont,
_actualFont);

with this:

_updateFont();

An additional benefit would be that it's easier to reason about our application state if all font related changes go through _updateFont. Currently only DPI changes don't make use of that function in ControlCore which seems kinda weird to me.

Oh and this bug probably also exists for AtlasEngine... Using _updateFont would fix it for both.

@PankajBhojwani
Copy link
Contributor Author

PankajBhojwani commented Feb 15, 2022

@lhecker's suggestion makes a lot more sense, PR has been updated to use updateFont() instead (and confirmed that the fix works)

@DHowett DHowett changed the title Fix font axes/features not working when moving the window between displays with different scaling Fix font axes/features not working on DPI change Feb 15, 2022
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 15, 2022
@ghost
Copy link

ghost commented Feb 15, 2022

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@lhecker
Copy link
Member

lhecker commented Feb 15, 2022

@PankajBhojwani This fixes #11317 now, which is why I've modified your commit message.
The fix for #11317 isn't perfect, because the window gets elongated horizontally when the DPI changes, but I believe that's another bug...

@DHowett DHowett added zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. zStable-Service-Queued-1.12 A floating label that tracks the current Stable version for servicing purposes. and removed AutoMerge Marked for automatic merge by the bot when requirements are met labels Feb 15, 2022
@DHowett
Copy link
Member

DHowett commented Feb 15, 2022

From chat:

nevermind, it doesn't fix it ;P

@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 15, 2022
@ghost ghost merged commit 3b46794 into main Feb 16, 2022
@ghost ghost deleted the dev/pabhoj/font_feats_inconsistent branch February 16, 2022 00:07
DHowett pushed a commit that referenced this pull request Feb 16, 2022
When the dpi is changed, call `updateFont()` instead of `TriggerFontChange`, this
means that we continue to use the existing font features/axes

Closes #11287

(cherry picked from commit 3b46794)
@DHowett DHowett removed the zStable-Service-Queued-1.12 A floating label that tracks the current Stable version for servicing purposes. label Feb 16, 2022
DHowett pushed a commit that referenced this pull request Feb 16, 2022
When the dpi is changed, call `updateFont()` instead of `TriggerFontChange`, this
means that we continue to use the existing font features/axes

Closes #11287

(cherry picked from commit 3b46794)
@DHowett DHowett removed the zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. label Feb 16, 2022
@ghost
Copy link

ghost commented Mar 25, 2022

🎉Windows Terminal v1.12.1073 has been released which incorporates this pull request.:tada:

Handy links:

@ghost ghost mentioned this pull request Mar 25, 2022
@ghost
Copy link

ghost commented Mar 25, 2022

🎉Windows Terminal Preview v1.13.1073 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font Features is inconsistent
4 participants