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

DynaPDF Manual - Page 654

Previous Page 653   Index   Next Page 655

Function Reference
Page 654 of 750
// 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
Style
Courier
Courier
Courier
fsRegular
Courier
Courier Bold
Courier-Bold
fsBold
Courier
Courier Oblique
Courier-Oblique
fsItalic
Courier
Courier Bold Oblique
Courier-BoldOblique
fsBold + fsItalic
 

Previous topic: Font Styles

Next topic: Code pages versus character sets