Xojo Conferences

DynaPDF Manual - Page 673

Previous Page 672   Index   Next Page 674

Function Reference
Page 673 of 770
// Width class 5 (Normal), font weight 700 (bold), italic
TFStyle style = WidthToStyle(5) | WeightToStyle(700) | fsItalic;
// or use the defined constants instead
TFStyle style = fsNormal | fsBold | fsItalic;
A valid font weight is a multiple of 100 or 100. Values like 450 or 770 are not meaningful.
Supported font formats
The following font formats are supported by DynaPDF (on Mac OS X the same formats are also
supported if they are stored in resource or data forks, as well as in .dfont or .suit files):
TrueType fonts (*.ttf). MAC Standard, Unicode or CJK encoded fonts.
TrueType Collection (*.ttc). These fonts contain multiple fonts into one.
OpenType fonts (*.otf) with TrueType or PostScript outlines.
PostScript Type 1 fonts (*.pfb or *.pfa). No metric files are required.
Font Subsetting
When a TrueType, OpenType or a font of a TrueType Collection will be embedded, DynaPDF creates
a subset of this font which contains the used characters only. The function constructs a completely
new font file that contains no unnecessary information.
Type 1 fonts are always stored unchanged in the PDF file. Font subsetting is not supported for this
font format.
Font Embedding
All supported font formats can be embedded as long as font embedding is not restricted in the font
file. Font embedding can be disabled when using the code page 1252 or MacRoman, but it is required
if another code page is used; the parameter Embed is ignored in this case. If font embedding is
required but not possible due to licensing restrictions the function will fail.
However, when creating Asian PDF files it is possible to use CID-keyed fonts instead. The CID-
Keyed Font Architecture works with embedded and non-embedded OpenType and TrueType fonts.
See SetCIDFont() for further information.
The 14 Standard Fonts
All versions of Adobe's Acrobat support 14 standard fonts. These fonts are always available
independent whether they're embedded or not.
Family name
Full name
PostScript name
Courier Bold
Courier Oblique
Courier Bold Oblique
fsBold + fsItalic

Previous topic: Full name, PostScript name, Font Styles

Next topic: Code pages versus character sets