Font

Top  Previous  Next
Font( [compound fontname], [Encoding], [Embed], [translate] ) => specify the wanted font according to Xbase syntax, nominal point size followed by dot followed by font name. If none provided defaults to “10.Courier New”, with WinAnsiEncoding. Basic fonts are included in the Xbase PDF Class, but with version 3, any True Type font can be used to create your document, (see FontDef bellow), also any size can be used, there is no limitation to maximum size or the number of fonts used in one document. The existing fonts can be combined with Bold and or Italic, and “Underscore” can be added to any combination, providing underlining of text.

 

Compound fontname (character) : is the font compound name, point size, followed by font family name. Valid fonts are Arial, Courier New, Times New Roman, Helvetica, Tahoma, Verdana, Symbols and ZapfDingbats fonts, combined to Bold, Italic or Bold Italic. Underscore can be added to any of the available fonts, like Font( “10.Arial Underscore” ) or Font( “12.Helvetica Bold Underscore”). Other fonts might be used using the FontDef method.

 

Available fonts are (see Fonts.PDF) :

 

Arial

a e i o u A E I O U - 1 2 3 4 5

Arial Bold

a e i o u A E I O U - 1 2 3 4 5

Arial Bold Italic

a e i o u A E I O U - 1 2 3 4 5

Arial Italic

a e i o u A E I O U - 1 2 3 4 5

Courier New

a e i o u A E I O U - 1 2 3 4 5

Courier New Bold

a e i o u A E I O U - 1 2 3 4 5

Courier New Bold Italic

a e i o u A E I O U - 1 2 3 4 5

Courier New Italic

a e i o u A E I O U - 1 2 3 4 5

Helvetica

a e i o u A E I O U - 1 2 3 4 5

Helvetica Bold

a e i o u A E I O U - 1 2 3 4 5

Helvetica Bold Italic

a e i o u A E I O U - 1 2 3 4 5

Helvetica Italic

a e i o u A E I O U - 1 2 3 4 5

Symbol

α ε ι ο υ Α Ε Ι Ο Υ - 1 2 3 4 5

Tahoma

a e i o u A E I O U - 1 2 3 4 5

Tahoma Bold

a e i o u A E I O U - 1 2 3 4 5

Times New Roman

a e i o u A E I O U - 1 2 3 4 5

Times New Roman Bold Italic

a e i o u A E I O U - 1 2 3 4 5

Times New Roman Italic

a e i o u A E I O U - 1 2 3 4 5

Times New Roman Bold

a e i o u A E I O U - 1 2 3 4 5

Verdana

a e i o u A E I O U - 1 2 3 4 5

Verdana Bold

a e i o u A E I O U - 1 2 3 4 5

Verdana Bold Italic

a e i o u A E I O U - 1 2 3 4 5

Verdana Italic

a e i o u A E I O U - 1 2 3 4 5

ZapfDingbats

a e i o u A E I O U - 1 2 3 4 5

 

Encoding (character) : This parameter can be used to specify different encoding for the chosen font during the creation of the PDF file, one of the following values should be used :

 

Encoding

Comments

WinAnsiEncoding

Normal Windows encoding

MacRomanEncoding

Mac Roman encoding

PDFDocEncoding

PDF Doc encoding

ISO8859_2

(Latin 2) Slavic languages of Central Europe

ISO8859_3

(Latin 3) Esperanto, Maltese

ISO8859_4

(Latin 4) Estonian, Baltic Languages, Greelandic

ISO8859_5

Bulgarian, Russian, Serbian

ISO8859_6

Arabic

ISO8859_7

Modern Greek

ISO8859_8

Hebrew

ISO8859_9

(Latin 5) Western Europe, Turkish

ISO8859_10

(Latin 6) Nordic languages

ISO8859_11

Thai Language

ISO8859_13

(Latin 7) Baltic languages

ISO8859_14

(Latin 8) Celtic

ISO8859_15

(Latin 9) Adds EURO as well as French, Finish to Latin 1

ISO8859_16

(Latin 10) Hungarian, Polish, Romanian, Slovenian

CP1250

Central Europe

CP1251

Cyrillic

CP1253

Greek

CP1254

Turkish

CP1255

Hebrew

CP1256

Arabic

CP1257

Baltic

CP1258

Vietnam

 

Embed (logical) : specify if the font file is to be embedded in the document, or not. Embedding the font makes the document larger in size, but assures that the font will be respected, if not embedded, the reader may chose a similar font for displaying the document. This option is valid only for the PDF document to be created.

 

Examples : GraPdf:Font( “10.Arial” ) will print with Arial fonts using 10 point size characters like

=> abcdefABCDEF12345.