Skip to content

Commit

Permalink
feat: set the loadSystemFonts option of resvg-js to false (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl authored Feb 25, 2024
1 parent 4920c10 commit 5d593a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
> [Github Readme Stats](https://github.com/anuraghazra/github-readme-stats): One of the best tools out there for generating awesome Github stats cards.
>
> [Resvg Js](https://github.com/yisibl/resvg-js): A high-performance SVG renderer and toolkit.
> [resvg-js](https://github.com/yisibl/resvg-js): A high-performance SVG renderer and toolkit.
>
> [Satori](https://github.com/vercel/satori): An enlightened library to convert HTML and CSS to SVG.
Expand Down
2 changes: 1 addition & 1 deletion packages/pixel-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
> [Github Readme Stats](https://github.com/anuraghazra/github-readme-stats): One of the best tools out there for generating awesome Github stats cards.
>
> [Resvg Js](https://github.com/yisibl/resvg-js): A high-performance SVG renderer and toolkit.
> [resvg-js](https://github.com/yisibl/resvg-js): A high-performance SVG renderer and toolkit.
>
> [Satori](https://github.com/vercel/satori): An enlightened library to convert HTML and CSS to SVG.
Expand Down
5 changes: 4 additions & 1 deletion packages/pixel-profile/src/cards/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ export async function renderStats(stats: Stats, options: Options = {}): Promise<
fitTo: {
mode: 'width',
value: width
}
},
font: {
loadSystemFonts: false, // It will be faster to disable loading system fonts.

Check failure on line 114 in packages/pixel-profile/src/cards/stats.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `,`

Check failure on line 114 in packages/pixel-profile/src/cards/stats.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected trailing comma
},

Check failure on line 115 in packages/pixel-profile/src/cards/stats.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `,`

Check failure on line 115 in packages/pixel-profile/src/cards/stats.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected trailing comma
} as const

const pngData = new Resvg(svg, opts).render()
Expand Down

0 comments on commit 5d593a9

Please sign in to comment.