You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use a custom typeface in Avalonia.Svg but its not working.
I'm loading the font like this: var font_stream = AssetLoader.Open(new Uri("avares://AvaloniaSvgSkiaSample/Assets/Fonts/Garamond/EBGaramond-VariableFont_wght.ttf")); var result = SKFontManager.Default.CreateTypeface(font_stream);
Which works (it creates the SKTypeFace at least) but is not the approach described in the Wiki article because SvgTextExtensions doesn't seem to exist anymore so that might be part of my problem.
Then I'm using the sample app AvaloniaSvgSkiaSample and just adding a text element below the circle (in the string tab) like this: <text x="40" y="40" font-family="EB Garamond">yoo</text>
But the family name isn't being recognized by SkiaAssetLoader.FindTypefaces. Its the right family name (I verified it from result of the CreateTypeFace call).
How do I add the SKTypeFace I created to be recognized?
The text was updated successfully, but these errors were encountered:
I'm trying to use a custom typeface in Avalonia.Svg but its not working.
I'm loading the font like this:
var font_stream = AssetLoader.Open(new Uri("avares://AvaloniaSvgSkiaSample/Assets/Fonts/Garamond/EBGaramond-VariableFont_wght.ttf")); var result = SKFontManager.Default.CreateTypeface(font_stream);
Which works (it creates the
SKTypeFace
at least) but is not the approach described in the Wiki article becauseSvgTextExtensions
doesn't seem to exist anymore so that might be part of my problem.Then I'm using the sample app
AvaloniaSvgSkiaSample
and just adding a text element below the circle (in the string tab) like this:<text x="40" y="40" font-family="EB Garamond">yoo</text>
But the family name isn't being recognized by
SkiaAssetLoader.FindTypefaces
. Its the right family name (I verified it fromresult
of theCreateTypeFace
call).How do I add the
SKTypeFace
I created to be recognized?The text was updated successfully, but these errors were encountered: