Is this Asponse.Font C++ library able to covert Microsofts *.EOT to *.TTF font format?
The EOT font is using the Monotype MTX compression internal.
References:
https://www.w3.org/Submission/2008/SUBM-EOT-20080305/
https://www.w3.org/Submission/2008/SUBM-MTX-20080305/
@goehte
Yes, Aspose.Font for C++ is able to save from any font format to TTF or WOFF formats. However, if you face any issue, please feel free to let us know.
@goehte
Adding more to our previous response, following is the code snippet to achieve your requirements:
System::String dataDir = RunExamples::GetDataDir_Data();
System::ArrayPtr<uint8_t> fontMemoryData = System::IO::File::ReadAllBytes(dataDir + u"EuroSansPro - Lig.eot");
System::SharedPtr<FontDefinition> fd = System::MakeObject<FontDefinition>(Aspose::Font::FontType::TTF, System::MakeObject<FontFileDefinition>(u"eot", System::MakeObject<ByteContentStreamSource>(fontMemoryData)));
System::SharedPtr<TtfFont> ttfFont = System::DynamicCast_noexcept<Aspose::Font::Ttf::TtfFont>(Aspose::Font::Font::Open(fd));
System::String outputFile = RunExamples::GetDataDir_Data() + u"EuroSansPro - Lig.ttf";
ttfFont->Save(outputFile);
However some limitations are present:
- The font file will open as ttfFont, but then the trimmed font will be saved
So, in output TTF font, not all initial font tables will be presented, but only those that Aspose.Font can handle i.e. these are head, cmap, glyf, cvt, fpgm, prep, hea, hmtx, loca, maxp and other tables.
In case you notice any issue with your font files, please share them with us so that we may further proceed to assist you accordingly.