We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

OTF not displaying in Acrobat Pro DC

When embedding and using Gotham Narrow (OTF), Acrobat complains that the font cannot be found. I can use other fonts.

Here’s the error in Adobe Acrobat Pro DC:

Cannot find or create teh font ‘GothamNarrow-Light’. Some characters may not display or print correctly.

Aspose.PDF .NET 18.8.0

C#:

Font regularFont;
string regularPath = Path.Combine(fontsPath, "GothamNarrow-Light.OTF");
if (!File.Exists(regularPath))
{
	throw new FileNotFoundException("Font file not found. ", regularPath);
}
using (var stream = new FileStream(regularPath, FileMode.Open, FileAccess.Read))
{
	regularFont = FontRepository.OpenFont(stream, FontTypes.OTF);
	regularFont.IsEmbedded = true;
	regularFont.IsSubset = false;
}
var paragraph = new TextState
{
	FontSize = 11,
	ForegroundColor = Color.FromCmyk(c: .7, m: .68, y: .64, k: .74),
	Font = regularFont,
	LineSpacing = 4.5f
};

var doc = new Document();

var page = doc.Pages.Add();

var text = new TextFragment($"{methodName} created on {DateTime.Now}");
text.TextState.ApplyChangesFrom(paragraph);
page.Paragraphs.Add(text);

I tried both OTF and TTF files. Get them here:


@dirq

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFNET-45293 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Thanks for the quick response.