Custom Font Not Applied During SVG Rendering #3314
Unanswered
martin-barre
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone
I have a problem with the SkiaSharp library when I try to generate a PNG image from an SVG containing text with a custom font.
input.svg
Program.cs
CustomTypefaceProvider.cs
As you can see, I have an SVG that includes a tag with a specific font-family, and I render it as a PNG using SkiaSharp.
The issue is that the custom font is not applied during rendering, despite using a CustomTypefaceProvider.
However, if I override my custom font with a standard font like Arial, the custom font work perfectly.
input.svg
CustomTypefaceProvider.cs
I don’t understand why the custom font only work when I replace another font.
Has anyone encountered this issue before? Any ideas on how to ensure that the custom font is properly loaded and usable by SkiaSharp during image generation without replacing an existing font?
Any help or suggestions would be greatly appreciated. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions