DynaPDF Manual - Page 714
Previous Page 713 Index Next Page 715
Page 714 of 821
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.
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).
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
Unicode format in TrueType and OpenType fonts. However, most available fonts can be selected
with the Ansi version of SetFont() too because a usual font name contains no special characters.
A family name is not unique; it specifies the font family and not a specific font of a given style.
The combination of the family name and the font style identifies a font. For example, the font Arial
is available in several different styles such as Regular, Bold, Italic, or BoldItalic. The style
information Bold, Italic, and so on is not part of the font name. That is the reason why the style is a
separate parameter of SetFont().
Each font style is physically stored in a separate font file. However, if a requested style is not
available, SetFont() emulates the missing style if a compatible variant can be found. The emulation
of bold and italic font styles can be disabled with SetFontWeight() and SetItalicAngle().
The full name is a unique font name that identifies a font exactly. The full name is a combination of
the family name plus the style name, e.g. "Arial Bold Italic". This is the name that Windows exposes
to users. The parameter Style is ignored when selecting fonts via the full name.
TrueType and OpenType fonts can contain many localized full names. DynaPDF loads all these
language variants so that they can be used independent of the current locale.
Previous topic: Font enumeration
Next topic: PostScript name, Font Styles, Supported font formats, Font Subsetting