Aspose.Font for C++ is flexible and easy to use library to work with different font formats. API supports multiple font formats like TrueType, OpenType, CFF, and Type1. Furthermore, It can read different fonts from files as well as from stream, provide its data structures information along with any glyph, encoding information for all the font types, and save fonts. End-users can get help through its rendering subsystem to render any desired glyph or text.
An overview of Aspose.Font for C++ API.
The library fully supports C++ applications developed on the Windows and Linux platform having system requirements.
Aspose.Font for C++ supports the following file formats.
Load font documents from disc
Load font files stream
Read font information
Save updated font files to disc
Read Glyphs and Metrics information
Detect Latin Symbols in Fonts
Extract embedded licensing information
Render text using font glyphs
Support various font formats
Aspose.Font for C++ can easily load, extract, and save TrueType font formats. Here are just few lines of code for TrueType TTF.
//byte array to load Font from System::ArrayPtr fontMemoryData = System::IO::File::ReadAllBytes(dataDir + u"Montserrat-Regular.ttf"); System::SharedPtr fd = System::MakeObject(Aspose::Font::FontType::TTF, System::MakeObject(u"ttf", System::MakeObject(fontMemoryData))); System::SharedPtr ttfFont = System::DynamicCast_noexcept(Aspose::Font::Font::Open(fd)); //Save CffFont to disk //Output Font file name with full path System::String outputFile = RunExamples::GetDataDir_Data() + u"Montserrat-Regular_out.ttf"; ttfFont->Save(outputFile);