|
pdfmm 0.9.20
|
#include <PdfFontManager.h>
Public Member Functions | |
| ~PdfFontManager () | |
| PdfFont * | GetFont (PdfObject &obj) |
| PdfFont * | GetFont (const std::string_view &fontName, const PdfFontCreationParams ¶ms={ }) |
| PdfFont * | GetFont (FT_Face face, const PdfEncoding &encoding=PdfEncodingFactory::CreateWinAnsiEncoding(), bool isSymbolCharset=false, PdfFontInitOptions initOptions=PdfFontInitOptions::Embed) |
This class assists PdfDocument with caching font information.
Additional to font caching, this class is also responsible for font matching.
PdfFont is an actual font that can be used in a PDF file (i.e. it does also font embedding) and PdfFontMetrics provides only metrics informations.
| PdfFontManager::~PdfFontManager | ( | ) |
Destroy and empty the font cache
| PdfFont * mm::PdfFontManager::GetFont | ( | const std::string_view & | fontName, |
| const PdfFontCreationParams & | params = { } |
||
| ) |
Get a font from the cache. If the font does not yet exist, add it to the cache.
| fontName | a valid fontname |
| params | font creation params |
| PdfFont * PdfFontManager::GetFont | ( | FT_Face | face, |
| const PdfEncoding & | encoding = PdfEncodingFactory::CreateWinAnsiEncoding(), |
||
| bool | isSymbolCharset = false, |
||
| PdfFontInitOptions | initOptions = PdfFontInitOptions::Embed |
||
| ) |
Get a font from the cache. If the font does not yet exist, add it to the cache.
| face | a valid freetype font face (will be free'd by pdfmm) |
| encoding | the encoding of the font. The font will not take ownership of this object. |
| isSymbolCharset | whether to use a symbol charset |
| embed | if true a font for embedding into PDF will be created |