×
Menu
Index

FontDef

 
 
  • FontDef( family name, file name, embed ) => this powerful method enables you to use any font installed in your system. By defining the font family name, and its file container, you can use any existing font, for non Latin characters, bar codes, symbols, etc.
 
 
Family name (character) : is the font compound name that you will be using latter to create your document.
 
File name (character) : is the name of the file for that specified font. This file must be in the %SystemRoot%\Fonts folder or at the current working directory and must be a either a TTF format file, or a AFM/PFB file. If the file is not found at usage time, font will default to Courier New.
 
Embed (logical) : indicates if the font should be embedded (incorporated) to the document, if TRUE, the TTF file will be embedded to the PDF file, making it larger in size, but with a better font definition, if FALSE, the font will no be incorporated to the file, making it smaller, but eventually having a substitute font if the same font is not installed at viewing time.
 
Examples : oPdf:FontDef( “3-9 Barcode”, “FREE3OF9X.TTF” ) this will add the barcode TTF font to your pdf, enabling you to print barcode data.
                oPdf:FontDef( “Avant Garde Book”, “avgardn.ttf” ) will allow you to use the Avant Garde font in your document.
 
Observation : you must define all the variations that you want to use in a font, there are separate files for Bold, Italic and Bold Italic fonts, and they must be defined one by one to XbpPDF.