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 fallback for composite keys containing relative URIs #14943

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

MrJul
Copy link
Member

@MrJul MrJul commented Mar 12, 2024

What does the pull request do?

This PR fixes the font fallback mechanism throwing whenever a fallback character is needed for a composite key containing a relative URI.

A unit test has been added.

What is the current behavior?

The application crashes with System.InvalidOperationException: This operation is not supported for a relative URI.

What is the updated/expected behavior with this PR?

The font fallback works.

Note

The removal of if (source.Scheme == SystemFontScheme) return SystemFonts.TryGetGlyphTypeface(...) isn't an error: it's an intended simplification since GetFontCollection already has a special case for SystemFontScheme.

@MrJul MrJul added the backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch label Mar 12, 2024
@maxkatz6 maxkatz6 requested a review from Gillibald March 12, 2024 21:59
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0046132-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 merged commit fb632f0 into AvaloniaUI:master Mar 13, 2024
4 of 6 checks passed
@MrJul MrJul deleted the fix/font-fallback-relative-uri branch March 16, 2024 10:21
maxkatz6 pushed a commit that referenced this pull request Apr 6, 2024
* Add failing test for font fallback with relative URI

* Fix font fallback for composite keys containing relative URIs
@maxkatz6 maxkatz6 added backported-11.1.x and removed backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Apr 20, 2024
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.

4 participants