|
|
|
@ -33,15 +33,11 @@ namespace Avalonia.Skia.UnitTests.Media |
|
|
|
{ |
|
|
|
var fontManager = new FontManagerImpl(); |
|
|
|
|
|
|
|
//we need to have a valid font name different from the default one
|
|
|
|
string fontName = fontManager.GetInstalledFontFamilyNames().First(); |
|
|
|
|
|
|
|
var glyphTypeface = (GlyphTypefaceImpl)fontManager.CreateGlyphTypeface( |
|
|
|
new Typeface(new FontFamily($"A, B, {fontName}"), weight: FontWeight.Bold)); |
|
|
|
new Typeface(new FontFamily($"A, B, Arial"), weight: FontWeight.Bold)); |
|
|
|
|
|
|
|
var skTypeface = glyphTypeface.Typeface; |
|
|
|
|
|
|
|
Assert.Equal(fontName, skTypeface.FamilyName); |
|
|
|
|
|
|
|
Assert.True(skTypeface.FontWeight >= 600); |
|
|
|
} |
|
|
|
|
|
|
|
|