Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 659

Previous Page 658   Index   Next Page 660

Function Reference
Page 659 of 750
This parameter specifies the angle, between each character's base line and the x-axis of the device.
DynaPDF does not support a function that enables printing of characters in this way. Each character
must be printed separately with the function WriteAngleText() to get the same result.
The font weight can be in the range 0 to 1000 (zero means don't know). A font can be installed in up
to 10 different font weights and each weight refers to another font file. The weight is encoded in the
parameter Style of a SetFont() call. The helper function WidthToStyle() converts a weight to a TFStyle
constant. A valid font weight is dividable by 100. A value like 345 is no valid font weight while 300
or 400, for example, would be correct.
The style flags underlined and strikeout are supported by SetFont() too. The only difference is that
each flag can be set with one parameter because the parameter Style of SetFont() is a bit-mask. See
sesction Font Styles for further information.
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.
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 whished font by the GDI.
SetFont() supports no corresponding parameter or style flag.
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.

Previous topic: nEscapement

Next topic: SetFontEx