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.
At a Glance
An overview of Aspose.Font for C++ API.
- Support Multiple Formats
- Load font files from disc
- Load font from stream
- Read font information
- Read Glyphs and Metrics info
- Detect Latin Symbols
- Extract embedded licensing info
- Render text
- Save updated font files
The library fully supports C++ applications developed on the Windows and Linux platform having system requirements.
Supported File Formats
Aspose.Font for C++ supports the following file formats.
- True Type Font : TTF
- TTC, OpenType, CFF, Type1
Advanced C++ Font Management API Features
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
Load, Extract and Save TrueType Font
Aspose.Font for C++ can easily load, extract, and save TrueType font formats. Here are just few lines of code for TrueType TTF.
Load, Extract and Save TTF - C++
//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);