DynaPDF Manual - Page 530
Previous Page 529 Index Next Page 531

Function Reference
Page 530 of 883
The Delphi interface does not convert the value to the internal string format because this
programming language supports pointers and can therefore work directly with the original data.
A symbol name is usually just some kind of unique string with no further meaning.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
GetSysFontInfo
Syntax:
SI32 pdfGetSysFontInfo(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// Next font handle or 0 for the first call
struct TPDFSysFont* Out) // Out -> See below
struct TPDFSysFont
{
UI32
StructSize;
// Must be set to sizeof(TPDFSysFont)
TFontBaseType
BaseType;
// Font type
const char*
CIDOrdering;
// OpenType CID fonts only
const char*
CIDRegistry;
// OpenType CID fonts only
UI32
CIDSupplement;
// OpenType CID fonts only
UI32
DataOffset;
// Data offset
const UI16*
FamilyName;
// Family name
const char*
FilePathA;
// Font file path (Ansi string on Windows, UTF-8 otherwise
const UI16*
FilePathW;
// Font file path
UI32
FileSize;
// File size in bytes
TEnumFontProcFlags Flags;
// Bitmask
const UI16*
FullName;
// Full name
UI32
Length1;
// Length of the clear text portion of a Type1 font
UI32
Length2;
// Length of the eexec encrypted portion of a Type1 font
const char*
PostScriptNameA; // Postscript mame
const UI16*
PostScriptNameW; // Postscript mame
SI32
Index;
// Zero based font index if stored in a TrueType collection
LBOOL
IsFixedPitch;
// If true, the font is a fixed pitch font
TFStyle
Style;
// Font style
TUnicodeRange1
UnicodeRange1;
// Bitmask
TUnicodeRange2
UnicodeRange2;
// Bitmask
TUnicodeRange3
UnicodeRange3;
// Bitmask
TUnicodeRange4
UnicodeRange4;
// Bitmask
};
The function returns the most important properties of a system font. The member StructSize must be
set to sizeof(TPDFSysFont) before the function can be called.
If you want to know how many fonts will be returned then call EnumHostFonts() with the
parameter EnumProc set to NULL beforehand. The function returns the number of available fonts in
this case.
However, also if the number of host fonts is known, it is not possible to loop over the available fonts
from 0 to FontCount - 1 since the parameter Handle represents no array index.
In the first call set the parameter Handle to 0 or Out to NULL. In this case, the function returns the
handle of the first font file. This value must be passed to the next call until the return value is zero.
Note that if Out is set in the first call, then the first font will already be returned.
Previous topic: GetSVGSymbolCount, GetSVGSymbolName
Next topic: GetTabLen