Hopding / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
6.74k stars 645 forks source link

Add a custom font Bogle #1523

Open JaneCS2018 opened 11 months ago

JaneCS2018 commented 11 months ago

Describe your idea

Recently I am trying to build an react app and have difficulties about adding a custom font. I want to ues Bogle and tried using a ttf or otf file in my local, but it requires to use fs plug in. And this plug in only used in node js env. Also I am not able to get a url from this font online, what's the best solution? Is it possible to write a function for embeding more fonts for pdf-lib? Thanks.

How could this be implemented?

Is it possible to write a function for embeding more fonts for pdf-lib? Thanks.

What problem are you trying to solve?

Add a local file font in react app using pdf-lib

Why does this matter to you?

Not able to use certain font

Would others find this helpful?

create a function for react users

Are you interested in implementing your proposal?

Yes

Why are you submitting a proposal?

For improvement of fonts in the future.

Additional Notes

No response