forked from AvaloniaUI/Avalonia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple font sources per FontFamily and make sure combinations…
… of system and embedded fonts can be used (AvaloniaUI#12871)
- Loading branch information
Showing
9 changed files
with
286 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Avalonia.Media.Fonts; | ||
|
||
namespace Avalonia.Media | ||
{ | ||
internal class CompositeFontFamilyKey : FontFamilyKey | ||
{ | ||
public CompositeFontFamilyKey(Uri source, FontFamilyKey[] keys) : base(source, null) | ||
{ | ||
Keys = keys; | ||
} | ||
|
||
public IReadOnlyList<FontFamilyKey> Keys { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
|
||
namespace Avalonia.Media | ||
{ | ||
internal readonly record struct FontSourceIdentifier | ||
{ | ||
public FontSourceIdentifier(string name, Uri? source) | ||
{ | ||
Name = name; | ||
Source = source; | ||
} | ||
|
||
public string Name { get; init; } | ||
|
||
public Uri? Source { get; init; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.