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
30
31typedef struct
32{
33 PDAtom family;
34 PDFontStyle style;
35 PDAtom format;
37
38typedef PDErrCode(PDFSDK_CALLCONV* PDFontEnumProc)(const PDFontInfo* font, void* clientData);
39
40PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDEnumSysFonts(PDFontEnumProc proc, void* clientData);
41PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDEnumStandardFonts(PDFontEnumProc proc, void* clientData);
42PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocEnumFonts(PDDoc doc, PDFontEnumProc proc, void* clientData, PDProgressMonitor* mon, void* monData);
43PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDDocNeedsExtendedFontsPack(PDDoc doc, bool* pNeeds);
44PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDGetSysFontData(const PDFontInfo* font, PDReadStream* pStm);
45
46typedef PDErrCode(PDFSDK_CALLCONV* PDAddSystemFontProc)(const PDFontInfo* font,
47 const wchar_t* postscriptName,
48 const wchar_t* faceName,
49 void* addFontData);
50
51typedef struct {
52 PDErrCode(PDFSDK_CALLCONV* enumFonts)(void* clientData, PDAddSystemFontProc addFont, void* addFontData);
53 PDErrCode(PDFSDK_CALLCONV* getFont)(void* clientData, const wchar_t* faceName, void** pFontHandle);
54 PDErrCode(PDFSDK_CALLCONV* getFontName)(void* fontHandle, wchar_t* buffer, size_t bufSize, size_t* pSize);
55 PDErrCode(PDFSDK_CALLCONV* getFontFilePath)(void* fontHandle, wchar_t* buffer, size_t bufSize, size_t* pSize);
56 PDErrCode(PDFSDK_CALLCONV* getFontFaceIndex)(void* fontHandle, unsigned int* pIndex);
57 PDErrCode(PDFSDK_CALLCONV* matchFont)(void* clientData, const wchar_t* familyName, PDFontStyle style, bool isSerif, unsigned int unicode, void** pFontHandle);
58 PDErrCode(PDFSDK_CALLCONV* findFontForChar)(void* clientData, unsigned int unicodeChar, void** pFontHandle);
59 void(PDFSDK_CALLCONV* releaseFontHandle)(void* fontHandle);
60 void(PDFSDK_CALLCONV* freeClientData)(void* clientData);
62
63PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDSetSystemFontsHandler(const PDSystemFontsHandler* handler, void* clientData);
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif // PDFSDK_CORE_FONTS_H_INCLUDED_
int32_t PDErrCode
Definition errors.h:44
PDFontStyle
Specifies the styling to apply to a font.
Definition fonts.h:24
@ kPDFontStyleItalic
Definition fonts.h:26
@ kPDFontStyleBold
Definition fonts.h:27
@ kPDFontStyleBoldItalic
Definition fonts.h:28
@ kPDFontStyleRegular
Definition fonts.h:25
Math types.
Definition fonts.h:32
Definition progress_monitor.h:15
Definition fonts.h:51