Free Support Forum - aspose.com

OpenType with postscript outline

Hello,

I have a font file saved from embedded using Aspose.Pdf (using ttf extension).
I can load it and use the glyphs, but if I save back the font, the saved file is corrupted.

Is it possible to transform this kind of font to a real TTF ?Generic0-Regular.zip (6.1 KB)

Thanks

@tfipsrd

We were able to reproduce the issue in our environment while using Aspose.Font for .NET 20.12 and following code snippet.

byte[] fontMemoryData = File.ReadAllBytes(dataDir + "Generic0-Regular.ttf");
Aspose.Font.Sources.FontDefinition fd = new Aspose.Font.Sources.FontDefinition(Aspose.Font.FontType.TTF, new Aspose.Font.Sources.FontFileDefinition("ttf", new Aspose.Font.Sources.ByteContentStreamSource(fontMemoryData)));
Aspose.Font.Ttf.TtfFont ttfFont = Aspose.Font.Font.Open(fd) as Aspose.Font.Ttf.TtfFont;

//Work with data from just loaded TtfFont object

//Save TtfFont to disk
//Output Font file name with full path
string outputFile = dataDir + "Generic0-Regular_out.ttf";

ttfFont.Save(outputFile);

Therefore, we have logged an issue as FONTNET-175 in our issue tracking system for the sake of correction. We will further investigate the reasons behind this issue and let you know as soon as it is fixed. Please give us some time.

We are sorry for the inconvenience.