PoDoFo 0.9.20
|
#include <PdfFontConfigWrapper.h>
Public Member Functions | |
PdfFontConfigWrapper (FcConfig *fcConfig=nullptr) | |
std::string | SearchFontPath (const std::string_view fontPattern, unsigned &faceIndex) |
This class initializes and destroys the FontConfig library.
As initializing fontconfig can take a long time, you can create a wrapper by yourself to cache initialization of fontconfig.
This class is reference counted. The last user of the fontconfig library will destroy the fontconfig handle.
The fontconfig library is initialized on first used (lazy loading!)
PdfFontConfigWrapper::PdfFontConfigWrapper | ( | FcConfig * | fcConfig = nullptr | ) |
Create a new FontConfigWrapper and initialize the fontconfig library.
std::string PoDoFo::PdfFontConfigWrapper::SearchFontPath | ( | const std::string_view | fontPattern, |
unsigned & | faceIndex | ||
) |
Get the path of a font file on a Unix system using fontconfig
This method is only available if PoDoFo was compiled with fontconfig support. Make sure to lock any FontConfig mutexes before calling this method by yourself!
fontPattern | search pattern of the requested font |
style | font style |
faceIndex | index of the face |