Closed thomas-karthe closed 11 months ago
You can expose the PDF font name by implementing a custom FontResolver. The PDF font name is available from the SourceFont passed to the font resolver. You can find an example how to implement a font resolver here:
https://pdftosvg.net/api/T_PdfToSvg_FontResolver
Be aware that this will often not be useful, since the name of the PDF font will often be different from the desired font family name.
If a PDF includes fonts, that are not on the target machine, the used font-family name is documented in the PDF but not reflecting in the SVG.
In Acrobat reader the correct font name can be seen: In the SVG it appears like this :
.tx3KyHh{font-family:monospace;font-weight:bold;font-size:14.3px;}
The reported font-family is expected to be the correct one. This will make it easier to use the font if installed or to select a suitable substitution font.