Skip to content

Introduce font family mapping #17234

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

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

Gillibald
Copy link
Contributor

@Gillibald Gillibald commented Oct 10, 2024

What does the pull request do?

This PR adds an option to map a family name to a different FontFamily.

.With(new FontManagerOptions
{
    FontFamilyMappings = new Dictionary<string, FontFamily>
            {
                { "Segoe UI", new FontFamily("fonts:Inter#Inter") }
            }
})
.WithInterFont()

If Segoe UI is requested the font manager provides the Inter font

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@avaloniaui-bot
Copy link

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

@kekekeks kekekeks added this pull request to the merge queue Oct 10, 2024
Merged via the queue into AvaloniaUI:master with commit d3aa0c2 Oct 10, 2024
11 checks passed
@Gillibald Gillibald deleted the feature/fontFamilyMapping branch April 22, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants