Skip to content

[release/10.0.1xx-sr7] Revert PR #30068 — Fix FontImageSource centering regression on Windows#35689

Merged
PureWeen merged 2 commits into
release/10.0.1xx-sr7from
backport/pr-35642-to-release/10.0.1xx-sr7
Jun 2, 2026
Merged

[release/10.0.1xx-sr7] Revert PR #30068 — Fix FontImageSource centering regression on Windows#35689
PureWeen merged 2 commits into
release/10.0.1xx-sr7from
backport/pr-35642-to-release/10.0.1xx-sr7

Conversation

@kubaflo
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo commented Jun 1, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Backport of #35642 to release/10.0.1xx-sr7.
/cc @PureWeen

#35642)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

This PR reverts the changes introduced by
#30068, which caused an
FontImageSource is not centered and gets clipped.

### Root cause of Regression
PR #30068 introduced a regression in 10.0.60 where Image controls using
FontImageSource are no longer centered and get clipped on Windows. The
LayoutBounds-based canvas sizing produces a larger canvas than expected,
causing glyphs to overflow and appear misaligned in certain scenarios.

### Description of Change

PR #30068 fixed glyph centering by switching FontImageSourceService on
Windows to use a fontSize × fontSize layout and LayoutBounds for canvas
sizing, which caused some font glyphs to be cropped or tightly
constrained in certain scenarios. Reverting to restore the previous
rendering behavior.

### Issues Fixed
Fixes #35618

---------

(cherry picked from commit 9a4b5ec)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35689

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35689"

@kubaflo
Copy link
Copy Markdown
Contributor Author

kubaflo commented Jun 1, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@vishnumenon2684
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo
Copy link
Copy Markdown
Contributor Author

kubaflo commented Jun 2, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen merged commit 792abb4 into release/10.0.1xx-sr7 Jun 2, 2026
160 of 168 checks passed
@PureWeen PureWeen deleted the backport/pr-35642-to-release/10.0.1xx-sr7 branch June 2, 2026 21:22
@github-actions github-actions Bot added this to the .NET 10 SR7 milestone Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants