|
|
|
@ -32,9 +32,7 @@ namespace Avalonia.Media.Fonts |
|
|
|
/// <returns></returns>
|
|
|
|
private static IEnumerable<Uri> GetFontAssetsBySource(FontFamilyKey fontFamilyKey) |
|
|
|
{ |
|
|
|
var assetLoader = AvaloniaLocator.Current.GetService<IAssetLoader>() ?? |
|
|
|
throw new InvalidOperationException("Unable to locate IAssetLoader."); |
|
|
|
|
|
|
|
var assetLoader = AvaloniaLocator.Current.GetRequiredService<IAssetLoader>(); |
|
|
|
var availableAssets = assetLoader.GetAssets(fontFamilyKey.Source, fontFamilyKey.BaseUri); |
|
|
|
|
|
|
|
var matchingAssets = |
|
|
|
@ -51,8 +49,7 @@ namespace Avalonia.Media.Fonts |
|
|
|
/// <returns></returns>
|
|
|
|
private static IEnumerable<Uri> GetFontAssetsByExpression(FontFamilyKey fontFamilyKey) |
|
|
|
{ |
|
|
|
var assetLoader = AvaloniaLocator.Current.GetService<IAssetLoader>() ?? |
|
|
|
throw new InvalidOperationException("Unable to locate IAssetLoader."); |
|
|
|
var assetLoader = AvaloniaLocator.Current.GetRequiredService<IAssetLoader>(); |
|
|
|
|
|
|
|
var fileName = GetFileName(fontFamilyKey, out var fileExtension, out var location); |
|
|
|
|
|
|
|
|