forked from thx/resvg-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve custom loaded fonts (thx#209)
* feat: improve custom loaded fonts * feat: refactoring and adding test cases When `loadSystemFonts: true`, the `defaultFontFamily` option can also be omitted. * feat(wasm): support for getting the default font-family from `fontsBuffers` * chore: new example/text.js * feat: the defaultFontFamily is not found in the OS and needs to be fallback Previously, resvg-js would not match any fonts in SVG text, even if there were fonts in the OS that could render them. This commit makes it possible to fallback properly. ```js const resvg = new Resvg(svg, { font: { loadSystemFonts: true, defaultFontFamily: 'this-is-a-non-existent-font-family', }, }) ```
- Loading branch information
Showing
10 changed files
with
354 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.