DynaPDF Manual - Page 693

Previous Page 692   Index   Next Page 694

Function Reference
Page 693 of 787
fdwCharSet
A character set is not what a user types in with the keyboard; it specifies a character collection or an
alphabet that the font must support. The charset has the highest search priority, followed by
fdwPitchAndFamily. Font selection fails if no font can be found that supports the selected character
set, but it does not fail if the font name is wrong.
This is the major difference in comparison to DynaPDF since the font name has the highest search
priority in DynaPDF. The character set or code page parameter is not used for font selection.
The next difference is that the GDI does not automatically map code page code points to Unicode,
this must be done manually. This step is not required when working with DynaPDF; the required
mapping is automatically applied.
fdwPitchAndFamily
The pitch and family specifies whether a proportional or fixed pitch font should be selected. This
parameter should be set to FF_DONTCARE because the pitch has a higher search priority as the font
name. A wrong value of this parameter avoids the selection of the wished font by the GDI.
SetFont() supports no corresponding parameter or style flag.
lpszFace
This can be the family or full name of a font. The GDI does not support postscript names. The font
name has the lowest search priority in the GDI while it has the highest in DynaPDF.
SetFont() needs to know what kind of name is supplied. The wished mode must be set beforehand
with SetFontSelMode(). SetFont() can select fonts via family name, full name, or postscript name.
If all three names should tested then use SetFontEx() instead.
Remarks:
The function SetFont() is implemented in an Ansi and Unicode compatible version. Family and full
names are originally defined in Unicode so that this version is preferred when the font selection
mode is set to smFamilyName (default) or smFullName.
All string functions report a warning if one or more glyphs cannot be found. Call
GetMissingGlyphs() to determine which characters could not be found.
Return values:
If the function succeeds the return value is the font handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: nWidth, nEscapement, nOrientation, nWeight

Next topic: SetFontEx

Start Chat