-
Notifications
You must be signed in to change notification settings - Fork 59
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 (#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', }, }) ``` * ci: list Linux font dir * update CI * test * test2 * test3 * test4 * test5 apt-get install fontconfig * test5: remove fontconfig in CI
- 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.
8d5cd92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
resvg-js – ./
resvg-js-git-main-yisibl.vercel.app
resvg-js.vercel.app
resvg-js-yisibl.vercel.app