@tparassin,
Your code segment for specifying font folder and font substitution is right.
I have tested your scenario/ case a bit using a simple template file (attached). I have already installed “Haettenschweiler Regular” or “HATTEN” font on my Window8 pc. In the template file I used this font for a few cells data. Now I removed the font from “C:\Windows\Fonts” folder. I downloaded your custom font “pragati-narrow.zip” by browsing internet and extracted to my custom font folder (I extracted the two flavors, i.e., bold and regular of the font in the form of .ttf files). Now I use the following sample code and it works fine, it correctly replaces the missing font in the output PDF file format. I have also attached the output PDF file for your reference:
e.g
Sample code:
FontConfigs.SetFontFolder("E:\\test2\\mycustfontdir1", false);
FontConfigs.SetFontSubstitutes("Haettenschweiler", new string[] { "Pragati Narrow" });
Workbook workbook = new Workbook("e:\\test2\\Bk_custfont1.xlsx");
workbook.Save("e:\\test2\\out1.pdf");
Please make sure that your custom folder “d:\temp\Source_Sans_Pro” does not have any restrictions and your application should have access to this folder.
files1.zip (27.5 KB)