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

Can't load arial font #277

Open
thulnar opened this issue Feb 18, 2022 · 1 comment
Open

Can't load arial font #277

thulnar opened this issue Feb 18, 2022 · 1 comment

Comments

@thulnar
Copy link

thulnar commented Feb 18, 2022

i'm trying to load arial font (.ttf) but when i load it all text dissapears.
This is how i'm loading fonts
var arial = fs.readFileSync(__dirname + '/assets/fonts/arial.ttf'); var fontArial = new pdf.Font(arial);

Now this is the pdf with arial
output.pdf

and this is the pdf with helvetica (default library font)
output.pdf

Any help will be appreciated

@rkusa
Copy link
Owner

rkusa commented Jun 20, 2022

pdfjs uses opentype.js under the hood, can you try uploading your font on this site and check whether it is correctly showing glyphs? https://opentype.js.org/glyph-inspector.html

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

2 participants