Open phpdave11 opened 5 years ago
I am trying to avoid generating a PDF when the font I'm using doesn't have the glyph(s) that I'm trying to write to the PDF.
For example:
cxt.writeText("Test漢", 0, 0, { font: myFont, size: 50, colorspace: 'cmyk', color: 0x8000FF00 });
If "漢" does not exist in myFont, is it possible to have an exception thrown, so that I can handle this error? Currently, the characters are inserted but do not show up properly in the final PDF.
I am trying to avoid generating a PDF when the font I'm using doesn't have the glyph(s) that I'm trying to write to the PDF.
For example:
If "漢" does not exist in myFont, is it possible to have an exception thrown, so that I can handle this error? Currently, the characters are inserted but do not show up properly in the final PDF.