In this topic, we will explore how to get Font Metrics using C++. The font metrics include information about the glyphs in a font file. You can easily extract Font Metrics using C++ with few API calls as otherwise getting the information about font metrics in not that simple.
Steps to Get Font Metrics using C++
- Install the Aspose.Font for C++ library using the NuGet package Manager tool
- Include the reference to Aspose::Font namespace
- Create FontDefinition class object
- Initialize an object of Type1Font class
- Get different properties of Font Metrics
You can extract Font Metrics using C++ in few simple API calls. All you need is to access the FontDefinition class instance and read font metrics with C++.
Code to Read Font Metrics using C++
Previously, we learned how to get Font Metric in C#. However, in this topic we have implemented on how to extract Font Metrics using C++.