Closed poplevente closed 6 years ago
No, they are not - this is a long standing issue with the underlying original implementation by MrRio. There are projects, which try to fix this: https://github.com/sphilee/jsPDF-CustomFonts-support Fonts and font-mapping is still a big issue with that libray: https://stackoverflow.com/a/22356398/351836
We are thinking about merging the CustomFonts code into our fork. But this still needs a lot of work.
ok, thanks.
for now as the fastest solution I'm flattening all letters that are not extended ascii, with the ones without the diacritics. of course i know i have not too much text, so it's not taking me back in performance.
`function isASCII(text, extended) { return (extended ? /^[\x00-\xFF]$/ : /^[\x00-\x7F]$/).test(text); }
function escapeTextforPdf(text) { for(var i=0;i<text.length;++i) { if(!isASCII(text[i], true)) { text = text.replace(RegExp(text[i], "g"), text[i].normalize('NFD').replace(/[\u0300-\u036f]/g, "")); } } return text; }
escapeTextforPdf(text);`
I think this should be fixed, now that we have support for custom fonts, wouldn't you agree @HackbrettXXX ?
Note to myself to check if I can implement this into jsPDF
I just tested it and it works both with our recent changes and on the current master (assuming you embed a font that supports these characters).
Great work guys!
Hi, i'm having issues with some utf-8 characters For example text : őőŐŐűűááŐÚÜÖ is shown like QQQPPqqááPÚÜÖ
http://jsbin.com/rilace/edit?html,js,output
These characters aren't supported?