Aspose::Words::Fonts::FontInfo::get_IsTrueType method
Contents
[
Hide
]FontInfo::get_IsTrueType method
Indicates that this font is a TrueType or OpenType font as opposed to a raster or vector font. Default is true.
bool Aspose::Words::Fonts::FontInfo::get_IsTrueType() const
Examples
Shows how to print the details of what fonts are present in a document.
auto doc = MakeObject<Document>(MyDir + u"Embedded font.docx");
SharedPtr<Aspose::Words::Fonts::FontInfoCollection> allFonts = doc->get_FontInfos();
// Print all the used and unused fonts in the document.
for (int i = 0; i < allFonts->get_Count(); i++)
{
std::cout << "Font index #" << i << std::endl;
std::cout << "\tName: " << allFonts->idx_get(i)->get_Name() << std::endl;
std::cout << "\tIs " << (allFonts->idx_get(i)->get_IsTrueType() ? String(u"") : String(u"not ")) << "a trueType font" << std::endl;
}
See Also
- Class FontInfo
- Namespace Aspose::Words::Fonts
- Library Aspose.Words for C++