I have the simple test below that prints 2 words. The first word is “hello” in Helvetica-Bold. The second word is “world” in Times-Roman. But it should be in Frutiger-Roman.
Most of the Type 1 fonts I have installed on my system are in C:\PSFONTS. I also have a few installed in C:\ACROEXCH. Aspose.Pdf throws a fault when I try using the fonts in C:\PSFONTS.
Why? The fonts in each folder are Type 1 fonts from Adobe. There is no difference in the security settings on either folder or on the font files themselves.
Aspose.Pdf.TextInfo garamond = new Aspose.Pdf.TextInfo();
garamond.FontName = “Helvetica-Bold”;
garamond.FontSize = 18;
garamond.FontAfmFile = “C:\ACROEXCH\FONTS\PFM\HVBO____.PFM”;
garamond.FontOutlineFile = @“C:\ACROEXCH\FONTS\HVBO____.PFB”;
garamond.IsFontEmbedded = true;
frutiger_roman.FontName = “Frutiger-Roman”;
frutiger_roman.FontSize = 40;
frutiger_roman.FontAfmFile = @“C:\PSFONTS\PFM\ftr_____.PFM”;
frutiger_roman.FontOutlineFile = @“C:\PSFONTS\ftr_____.PFB”;
frutiger_roman.IsFontEmbedded = true;
frutiger_roman.IsUnicode = true;
Aspose.Pdf.Section p3 = pdf.Sections.Add();
Aspose.Pdf.Text p3_t0 = new Aspose.Pdf.Text(p3);
p3.Paragraphs.Add(p3_t0);
Aspose.Pdf.Segment seg0 = p3_t0.Segments.Add("hello ");
seg0.TextInfo = garamond ;
Aspose.Pdf.Segment seg1 = p3_t0.Segments.Add(“world!”);
seg1.TextInfo = frutiger_roman;
Can you please attach the corresponding font files and let us test it?