Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use custom font #123

Open
avocadolabsrepo opened this issue Jul 30, 2024 · 0 comments
Open

How to use custom font #123

avocadolabsrepo opened this issue Jul 30, 2024 · 0 comments

Comments

@avocadolabsrepo
Copy link

Hey,
I have been trying to add a custom font to the generated PDF. But it seems like not working.

I downloaded the font and passed it to the CSS as a base64 string. It didn't work.
@font-face {
font-family: 'Poppins';
src: url('data:font/truetype;charset=utf-8;base64,{{fontPopins}}');
font-weight: normal;
font-style: normal;

    }

Then I tried to load directly from the local file, but it also didn't work.
{
font-family: 'Poppins';
src: url('./Poppins-Regular.ttf') format('truetype');;
font-weight: normal;
font-style: normal;
}
Kindly let me know what I'm doing wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant