You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is possible to embed custom font encoded in base64 stored in js string like ''data:font/ttf;base64,8JCAgPS..." ?
I develop html page that loads from local html file and need export pdf files. Unfortunetly i need to use special characters like 'ůúřčž' and other, thats not possible with default fonts. When i try to load font from file i got Cross-Origin errors.
Becouse i resolved this problem before for images (using base64 encoded strings) iam curious if this is posible for font also?
This code resolves into Unknown font format error and i dont know what can i try next.
const fontBytes = ''data:font/ttf;base64,8JCAgPS...";
const font = await pdfDoc.embedFont(fontBytes);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is possible to embed custom font encoded in base64 stored in js string like ''data:font/ttf;base64,8JCAgPS..." ?
I develop html page that loads from local html file and need export pdf files. Unfortunetly i need to use special characters like 'ůúřčž' and other, thats not possible with default fonts. When i try to load font from file i got Cross-Origin errors.
Becouse i resolved this problem before for images (using base64 encoded strings) iam curious if this is posible for font also?
This code resolves into Unknown font format error and i dont know what can i try next.
Beta Was this translation helpful? Give feedback.
All reactions