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
hi, boss,
I am using Svg.Skia to draw a svg to canvas in blazor wasm, and my svg file have a text and the font-family is PingFang SC,I am trying to load this typeface to application by method: Loading custom typeface
I see the result of loading typeface is ok, but can not get typeface when painting the svg to canvas.
I study the code, and found the typeface is got from SkiaSharp.SKFontManager.Default at SkiaAssetLoader.cs line 38.
SkiaSharp.SKFontManager.Default can got typeface from OS, but in WASM, it is not work.
Is there a good way to solve this problem?
thank you for your great work
This discussion was converted from issue #251 on January 09, 2025 09:34.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi, boss,
I am using Svg.Skia to draw a svg to canvas in blazor wasm, and my svg file have a text and the font-family is PingFang SC,I am trying to load this typeface to application by method: Loading custom typeface
I see the result of loading typeface is ok, but can not get typeface when painting the svg to canvas.
I study the code, and found the typeface is got from SkiaSharp.SKFontManager.Default at SkiaAssetLoader.cs line 38.
SkiaSharp.SKFontManager.Default can got typeface from OS, but in WASM, it is not work.
Is there a good way to solve this problem?
thank you for your great work
here is my svg content:
Beta Was this translation helpful? Give feedback.
All reactions