PoDoFo 0.9.20
|
#include <PdfFontManager.h>
Public Member Functions | |
PdfFont * | SearchFont (const std::string_view &fontPattern, const PdfFontSearchParams &searchParams={ }, const PdfFontCreateParams &createParams={ }) |
PdfFont & | GetOrCreateFont (FT_Face face, const PdfFontCreateParams ¶ms={ }) |
void | EmbedFonts () |
Static Public Member Functions | |
static PdfFontMetricsConstPtr | SearchFontMetrics (const std::string_view &fontPattern, const PdfFontSearchParams ¶ms={ }) |
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.
void PdfFontManager::EmbedFonts | ( | ) |
Called by PdfDocument before saving
PdfFont & PdfFontManager::GetOrCreateFont | ( | FT_Face | face, |
const PdfFontCreateParams & | params = { } |
||
) |
face | a valid freetype font face. The face is referenced and the font data is copied |
params | font creation params |
PdfFont * PoDoFo::PdfFontManager::SearchFont | ( | const std::string_view & | fontPattern, |
const PdfFontSearchParams & | searchParams = { } , |
||
const PdfFontCreateParams & | createParams = { } |
||
) |
Get a font from the cache. If the font does not yet exist, add it to the cache.
fontPattern | a search font pattern |
params | font creation params |
|
static |
Try to search for fontmetrics from the given fontname and parameters