|
pdfmm 0.9.20
|
#include <PdfFontConfigWrapper.h>
Public Member Functions | |
| PdfFontConfigWrapper (FcConfig *fcConfig=nullptr) | |
| std::string | GetFontConfigFontPath (const std::string_view fontName, bool bold, bool italic) |
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.
| string PdfFontConfigWrapper::GetFontConfigFontPath | ( | const std::string_view | fontName, |
| bool | bold, | ||
| bool | italic | ||
| ) |
Get the path of a font file on a Unix system using fontconfig
This method is only available if pdfmm was compiled with fontconfig support. Make sure to lock any FontConfig mutexes before calling this method by yourself!
| pConfig | a handle to an initialized fontconfig library |
| pszFontName | name of the requested font |
| bBold | if true find a bold font |
| bItalic | if true find an italic font |