PoDoFo
1.0.0-dev
|
This class assists PdfDocument with caching font information. More...
#include <PdfFontManager.h>
Public Member Functions | |
PdfFont * | SearchFont (const std::string_view &fontPattern, const PdfFontSearchParams &searchParams={ }, const PdfFontCreateParams &createParams={ }) |
Get a font from the cache. More... | |
PdfFont * | SearchFont (const std::string_view &fontPattern, const PdfFontCreateParams &createParams) |
PdfFont & | GetStandard14Font (PdfStandard14FontType stdFont, const PdfFontCreateParams ¶ms={ }) |
PdfFont & | GetOrCreateFont (const std::string_view &fontPath, unsigned faceIndex, const PdfFontCreateParams ¶ms={ }) |
PdfFont & | GetOrCreateFontFromBuffer (const bufferview &buffer, unsigned faceIndex, const PdfFontCreateParams ¶ms={ }) |
PdfFont & | GetOrCreateFont (const std::string_view &fontPath, const PdfFontCreateParams ¶ms={ }) |
PdfFont & | GetOrCreateFontFromBuffer (const bufferview &buffer, const PdfFontCreateParams ¶ms={ }) |
PdfFont & | GetOrCreateFont (const PdfFontMetricsConstPtr &metrics, const PdfFontCreateParams ¶ms={ }) |
PdfFont * | GetCachedFont (const PdfReference &ref) |
Try getting the font from the cached font map Can return nullptr. | |
void | EmbedFonts () |
Called by PdfDocument before saving. | |
Static Public Member Functions | |
static PdfFontMetricsConstPtr | SearchFontMetrics (const std::string_view &fontPattern, const PdfFontSearchParams ¶ms={ }) |
Try to search for fontmetrics from the given fontname and parameters. More... | |
Friends | |
class | PdfDocument |
class | PdfMemDocument |
class | PdfStreamedDocument |
class | PdfFont |
class | PdfCommon |
class | PdfResources |
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 information.
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.