Closed fskpf closed 5 years ago
Was a test case issue only. I've used the /src/svg2pdf.js instead of the bundled /dist/ version.
The parsing is still broken, though. See https://github.com/hanamura/font-family/issues/4 if the family name is not quoted and contains white spaces, it will break with a parser error, e.g. font-family="Times New Roman".
I'm getting a Parse Error using 'Noto Sans' font. I'm using svg2pdf.js v1.3.3 and jsfpdf-yworks 2.0.1. Am I missing something to handle fonts with spaces?
We'll need to update the dependency to the "font-family" package, @HackbrettXXX . They've fixed the problem in the meantime. @scottctr - in the meantime, you can either build the package yourself from sources with the updated dependency or obviously simply rename the font and remove the space from its name as a workaround - since the font needs to be manually built and encoded anyway, this should be feasible.
We are using the latest version of "font-family" (0.2.0). The pull request fixing this issue is still not merged, unfortunately.
We could switch to this patched package instead: https://github.com/hanamura/font-family/pull/5#issuecomment-476328315 at least for the time being.
@scottctr now it should work ;) can you quickly check that? If not, we might need to fix the issue with spaces in font-families in jsPDF, as well (https://github.com/MrRio/jsPDF/issues/2264).
Yep, it works -- thanks much!
Exporting a text element with the 'font-family' attribute throws an exception "Uncaught TypeError: Cannot read property 'parse' of undefined"
at
The 'FontFamily' seems to be an external dependency, however, it is missing in a clean build. Is it just me or a general problem? I'm pretty sure the 'font-family' attribute worked in the past. I've attached a test case: different-font_html.txt
May be related to https://github.com/yWorks/svg2pdf.js/issues/64