Hello,
I have a problem with creating a PDF document with custom fonts. I attached both fonts and here is a short code snippet which demonstrates the problem:
System.Drawing.Font winFont = new System.Drawing.Font(“Humnst777 BT”, 10);
System.Diagnostics.Debug.WriteLine(winFont.FontFamily.Name);
Aspose.Pdf.Text.Font font = FontRepository.OpenFont(@“C:\Windows\Fonts\HUM777N.TTF”);
System.Diagnostics.Debug.WriteLine(font.FontName);
The first WriteLine prints the following value on the console: Humnst777 BT. The second WriteLine produces a different output: Humanist 777 BT. A similar issue happens with the OCR font.
Obviously Aspose detects these fonts under a different name than Windows does. This must be the reason that the PDF export fails (see the attached sample code). No error is reported, but an empty file is produced (zero bytes).
I am using PDF library version 2015.01.12, which is quite new.
Of course I can do the name mappings on my own for these two fonts, but I am afraid that our customers will be facing the same problem sometime in the future. Is there a way to completely solve this issue?
Thank you in advance for your help,
Boris