DynaPDF Manual - Page 677

Previous Page 676   Index   Next Page 678

Function Reference
Page 677 of 777
// Native CJK character set requires a CJK font
// Native CJK character set requires a CJK font
// Native CJK character set requires a CJK font
// Mac Roman
// Special encoding for Type1 fonts; should not used.
// Internal -> not usable
// TrueType and OpenType fonts only
// Internal -> not usable
// Internal -> not usable
The function loads a font that can be used for text output and interactive form fields. The parameter
Name must be either the Family, Full, or PostScript Name depending on the current font selection
mode (see SetFontSelMode() for further information).
It is also possible to set the font name to NULL to deactivate the active font. This can be useful when
creating form fields. It means, use the default font of the global AcroForm object.
Fonts are looked up in the search directories which can be set with AddFontSearchPath(). On
Windows and Mac OS X operating systems DynaPDF adds automatically the default font directories
of the system to the list of font search paths. See SetUseSystemFonts() for further information.
Font enumeration
The available system fonts can be enumerated with GetSysFontInfo().
Font Search Order
DynaPDF searches for fonts in a specific order which can be changed with SetFontSearchOrder() or
SetFontSearchOrderEx(). The default search order is:
TrueType, TrueType Collection, OpenType fonts with TrueType outlines
OpenType fonts with Postscript outlines
Standard PDF fonts
OpenType fonts with TrueType outline are treated like ordinary TrueType fonts. All supported font
formats can be explicitly disabled if necessary. See SetFontSearchOrder() for further information.
Font names
All font types support different naming schemes: family and full names are normally used on
Windows and the Postscript name is widely used on Linux and UNIX operating systems. Font
names are case-sensitive, they must be specified exactly. The naming sheme that should be used for
font selection can be set with SetFontSelMode() (the default is smFamilyName).
Family name
The family name is the typeface of a font, it refers to the member lfFaceName of the LOGFONT
structure on Windows (see GetLogFont() for further information). Family names are stored in

Previous topic: SetFont

Next topic: Full name, PostScript name, Font Styles