Skip to content

Cutom font not working in Safari browser. #2711

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

Closed
harshitsan opened this issue Mar 27, 2020 · 4 comments
Closed

Cutom font not working in Safari browser. #2711

harshitsan opened this issue Mar 27, 2020 · 4 comments

Comments

@harshitsan
Copy link

I am Trying to add Mr Dafoe Font into a pdf.
What is happening is

Font is showing in chrome and firefox

sign_chrome

But not woring in safari browser

It shows
safari

I am using MrDafoe Font ttf file.

like this...
pdf.addFileToVFS("MrDafoe-Regular.ttf", EncodedMrDafoe);

Is there any solution so that it can work in safari?. Or any other signature font supported by all browser.

@harshitsan
Copy link
Author

Okay so what I tried some other fonts and some of them worked in all browser so I have no other issue.

@omeriko
Copy link

omeriko commented Jun 28, 2021

Hi
I'm having the same problem: I installed Hebrew fonts (ttf file) exactly as they explain in the jsPDF documentation.
The result is that on all browsers it works OK, except on Safari browser it gives me gibberish.
Where did you find fonts that are compatible with Safari?

@giovannaalves
Copy link

giovannaalves commented Mar 4, 2022

Hi
I am having the same problem, except by the fact that my pdf was been generated on the server side, using node js.
When i preview the pdf from the storage on iphone or mac, it stay incorrect. But if i preview from any computer or smartphone else its works.
I would understand if the pdf was generated on the client side, but its not...
Is there any way to fix it?

jspdf version: 2.3.1
jspdf autotable version: 3.5.15

@giovannaalves
Copy link

giovannaalves commented Mar 5, 2022

Hi I am having the same problem, except by the fact that my pdf was been generated on the server side, using node js. When i preview the pdf from the storage on iphone or mac, it stay incorrect. But if i preview from any computer or smartphone else its works. I would understand if the pdf was generated on the client side, but its not... Is there any way to fix it?

jspdf version: 2.3.1 jspdf autotable version: 3.5.15

By the way jspdf don't suports otf fonts: #2276.
I was using a otf font that was converted to ttf.
I updated the version to 2.5.1 and now it is working great.

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

3 participants