DynaPDF Manual - Page 872

Previous Page 871   Index   Next Page 873

Function Reference
Page 872 of 883
The tag will be output as plain text if it contains errors. Font loading errors are not
passed to the error callback function (if set), if a font of the list can be loaded.
A family name must be terminated with a colon and followed by the style flags as an
integer or hexadecimal number. A hexadecimal number must be preceeded with '0x' or
'0X'. The very same syntax is used in C/C++, or C#, for example.
Example Family Name:
"\FT[Courier New:0x2BC00001]" -> Ok (fsBold | fsItalic)
"\FT[Courier New : 0]"
-> Ok (fsNone)
"\FT[Courier New : 419430400] -> Ok (fsRegular as Integer)
"\FT[CourierNewPSMT, 0]Some text..." -> Ok
"\FT[CourierNewPSMT: 0]Some text..." -> Wrong!
The last example is wrong because a Postscript name was combined with style flags.
Note that there is no way to distinguish between the different font names. The font
cannot be found if a wrong name is provided.
Spaces between the font or style flags and the colon are ignored.
A Full Name must be terminated with a colon and followed by the keyword "full" (case-
insensitive).
Example Full Name:
"\FT[Courier New Bold:full]Some text..."
-> Ok
"\FT[ Courier New Bold : FULL]Some text..." -> Ok
Example alternate fonts:
"\FT[Arial Bold:full, Helvetica: 734003200, Verdana Bold :
full, Segoe UI :0x2BC00000, 4]" -> Ok
"\FT[3, Arial Bold:full, Helvetica: 734003200]" -> Wrong!
Since font handles must be valid, no alternate font can
ever be loaded. A font handle should be the last entry in
the list.
The style flags of the fonts Helvetica and Segoe UI are identically but defined one time as
an integer number and another time as hexadecimal number.
Examples:
Font handle:
"\FT[3]Some text..."
Font handle:
"\FT[3:0x2BC00001]Some text..." (fsBold|fsItalic)
Postscript name: "\FT[ArialMT]Some text..."
Family name:
"\FT[Courier New:0]Some text..."
Full name:
"\FT[Arial Bold:full]Some text..."
Alternate font:
"\FT[Arial Italic:full, Helvetica:1, 5]"
The second example combines a font handle with style flags. Although a font handle
specifies the font to use, the style flags enable bold and italic emulation if needed.
 

Previous topic: Command tags

Next topic: Special characters