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
To use the Arial font, you need to add the option: defaultFontFamily: 'Arial'.
resvg-js As of 2.5.0, default_font_familywill be empty. This is mainly for Wasm compatibility since system fonts can't be loaded on the Web; fonts can only be loaded on the Web via fontBuffers, and when this option is empty, there are no fonts on the Web.
You can turn on the logLevel: 'debug' option and will see which font is used:
📝 default_font_family = ''
Warning: The default font-family '' not found, set to 'SF Pro'.
Hi, I was trying to render a SVG document which has varied font weights in it. Here is an example script:
which I just ran using
bun
ornode example.js
.The output looks like this on my machine:
It resolves to the "Arial" font by default, which I know for certain supports bold font weight. I would expect these to have different font weights.
If I render the example SVG using
resvg
CLI (version 0.37.0), using this command:This is the output I get:
This is what I originally would have expected
resvg-js
to render before.The text was updated successfully, but these errors were encountered: