DynaPDF Manual - Page 123

Previous Page 122   Index   Next Page 124

Function Reference
Page 123 of 777
SI32 pdfAddFontSearchPath(
const PPDF* IPDF,
// Instance pointer
const char* APath, // Path to font file directory
SI32 Recursive)
// Include subdirectories (search recursively)
This function adds a search path to the list of available font search paths. An arbitrary number of
search paths can be added at runtime. Subdirectories are added recursively if the parameter
Recursive is true.
DynaPDF requires no separate metric files for Type1 fonts.
This function is implemented in an Ansi and Unicode compatible version. On non-Windows
operating systems, Unicode paths are converted to UTF-8 and passed to the Ansi version of the
Since DynaPDF version it is also possible to pass a font file to the function. This makes it
possible to load a specific font file with the same rules as other fonts in a search directory. The file
extension is not used to identify the font format. Resource forks, suitcases and dfont resources are
supported on Mac OS X. Note that the font file is not loaded into memory; it is just added to the list
of font files.
The list of search directories can be cleared at runtime with the function ClearHostFonts().
If system fonts are enabled (default) DynaPDF adds the default font directories of the operating
system automatically to the list of font search paths (Windows and Mac OSX only, see
SetUseSystemFonts() for further information). On Windows this is the %WINDIR%/Fonts directory
as well as fonts listed in the Registry and linked fonts.
On Mac OSX the following directories are added to the list of font search paths (in this order):
Return values:
If the function succeeds the function returns the number of found font files (this is maybe not the
number of available fonts, because the list is cleared each time all fonts in the list are processed
during font selection). If the function fails a negative error code is returned.

Previous topic: AddFieldToHideAction, AddFileComment

Next topic: AddImage