procedure AddStandardFontText(const Text: WString; StandardFont: TPdfStandardFont; FontSize: Single; X, Y: Double; Color: TColor; Alpha: Byte; Angle: Double = 0.0);
| Text | WString. Text to draw |
| StandardFont | TPdfStandardFont. One of the 14 standard faces: sfCourier, sfCourierBold, sfCourierBoldOblique, sfCourierOblique, sfHelvetica, sfHelveticaBold, sfHelveticaBoldOblique, sfHelveticaOblique, sfTimesRoman, sfTimesBold, sfTimesBoldItalic, sfTimesItalic, sfSymbol, sfZapfDingbats |
| FontSize | Single. Text size in points |
| X, Y | Double. Position of the text origin in PDF page units, measured from the bottom-left corner of the page |
| Color | TColor. Fill colour of the glyphs |
| Alpha | Byte. Fill opacity, 0 transparent to $FF opaque |
| Angle | Double. Rotation of the text baseline in degrees, anticlockwise. Defaults to 0 |
Unlike AddText, which embeds the system font it finds, this embeds no font program: every conforming reader already has these faces, so the file stays smaller
The trade is conformance. PDF/A and PDF/X both require all fonts embedded, so output meant for those profiles has to use AddText instead
The face names are matched against the base font names of ISO 32000-1 Table 109, so the enumeration maps one to one onto the standard 14
Pdf.AddStandardFontText('Draft', sfHelveticaBold, 24, 72, 720,
clGray, $80);
Pdf.UpdatePage;