alafr / SVG-to-PDFKit

Insert SVG into a PDF document created with PDFKit
MIT License
397 stars 111 forks source link

Show error message from PDFKit when a font fails to open #150

Closed julamb closed 2 years ago

julamb commented 2 years ago

This changes the current error message:

SVGElemText: failed to open font "Source Sans Pro" in PDFKit

to add the PDFKit error message, for example:

SVGElemText: failed to open font "Source Sans Pro" in PDFKit: Variations require a font with the fvar, gvar and glyf, or CFF2 tables.

This should make it easier to troubleshoot font loading errors.