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

Free Support Forum - aspose.app

ASPOSE.PDF Font Not working as Expected. It's Misbehaving

I have used mont font. It works okay on my local machine but it’s different in Dev servers and UAT Server. This is my code for loading it.
string fontFolder = Path.Combine(_rootEnviro.WebRootPath, “mont”);
string fontFile = Path.Combine(_rootEnviro.WebRootPath, “mont”, “Mont-ExtraLight.ttf”);
FontConfigs.SetFontFolder(fontFolder, true);
FolderFontSource fontSourceFolder = new FolderFontSource(fontFolder, false);
FileFontSource fontSourceFile = new FileFontSource(fontFile);
MemoryFontSource sourceMemory = new MemoryFontSource(File.ReadAllBytes(fontFile));
FontConfigs.SetFontSources(new FontSourceBase[] { fontSourceFolder, fontSourceFile, sourceMemory });

Then I define font like this
style.Font.Name = “Mont-ExtraLight”;

I tried Dejavu and it behaved the same

This topic has been moved to the related forum: https://forum.aspose.com/t/aspose-pdf-font-not-working-as-expected-its-misbehaving/255882