In the source code itself (as it has its own implementation
However, for my implementation I need to load the fonts from a web resource. As such I am using fetch() which returns a promise. In doing so, the svg-to-pdfkit complains because I haven't registered the font before exiting the fontCallback function. Is there a way to return a promise from the fontCallback function instead?
I have seen samples of how to use fontCallback:
However, for my implementation I need to load the fonts from a web resource. As such I am using fetch() which returns a promise. In doing so, the svg-to-pdfkit complains because I haven't registered the font before exiting the fontCallback function. Is there a way to return a promise from the fontCallback function instead?