PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
fonts.h
Go to the documentation of this file.
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_CORE_FONTS_H_INCLUDED_
4#define PDFSDK_CORE_FONTS_H_INCLUDED_
5
11#include <pdfsdk/math_types.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef enum {
18 kPDFontStyleRegular = 0,
19 kPDFontStyleItalic = 1,
20 kPDFontStyleBold = 2,
21 kPDFontStyleBoldItalic = 3
22} PDFontStyle;
23
24typedef struct
25{
26 PDAtom family;
27 PDFontStyle style;
28 PDAtom format;
30
31typedef PDErrCode(PDFSDK_CALLCONV* PDFontEnumProc)(const PDFontInfo* font, void* clientData);
32
33PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDEnumSysFonts(PDFontEnumProc proc, void* clientData);
34PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDEnumStandardFonts(PDFontEnumProc proc, void* clientData);
35PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocEnumFonts(PDDoc doc, PDFontEnumProc proc, void* clientData, PDProgressMonitor* mon, void* monData);
36PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocNeedsExtendedFontsPack(PDDoc doc, bool* pNeeds);
37PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDGetSysFontData(const PDFontInfo* font, PDReadStream* pStm);
38
39typedef PDErrCode(PDFSDK_CALLCONV* PDAddSystemFontProc)(const PDFontInfo* font,
40 const wchar_t* postscriptName,
41 const wchar_t* faceName,
42 void* addFontData);
43
44typedef struct {
45 PDErrCode(PDFSDK_CALLCONV* enumFonts)(void* clientData, PDAddSystemFontProc addFont, void* addFontData);
46 PDErrCode(PDFSDK_CALLCONV* getFont)(void* clientData, const wchar_t* faceName, void** pFontHandle);
47 PDErrCode(PDFSDK_CALLCONV* getFontName)(void* fontHandle, wchar_t* buffer, size_t bufSize, size_t* pSize);
48 PDErrCode(PDFSDK_CALLCONV* getFontFilePath)(void* fontHandle, wchar_t* buffer, size_t bufSize, size_t* pSize);
49 PDErrCode(PDFSDK_CALLCONV* getFontFaceIndex)(void* fontHandle, unsigned int* pIndex);
50 PDErrCode(PDFSDK_CALLCONV* matchFont)(void* clientData, const wchar_t* familyName, PDFontStyle style, bool isSerif, unsigned int unicode, void** pFontHandle);
51 PDErrCode(PDFSDK_CALLCONV* findFontForChar)(void* clientData, unsigned int unicodeChar, void** pFontHandle);
52 void(PDFSDK_CALLCONV* releaseFontHandle)(void* fontHandle);
53 void(PDFSDK_CALLCONV* freeClientData)(void* clientData);
55
56PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDSetSystemFontsHandler(const PDSystemFontsHandler* handler, void* clientData);
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif // PDFSDK_CORE_FONTS_H_INCLUDED_
int32_t PDErrCode
Definition errors.h:44
Math types.
Definition fonts.h:25
Definition progress_monitor.h:15
Definition fonts.h:44