Chris@909: To embed TrueType fonts (.TTF) files, you need to extract the font metrics and Chris@909: build the required tables using the provided utility (/fonts/ttf2ufm). Chris@909: Chris@909: TTF2UFM is a modified version of Mark Heath's TTF 2 PT1 converter Chris@909: (http://ttf2pt1.sourceforge.net/) by Steven Wittens Chris@909: (http://www.acko.net/blog/ufpdf). ttf2ufm, is included in /ttf2ufm-src. Chris@909: The /fonts/ttf2ufm folder contains a compiled Windows binary. Chris@909: TTF 2 UFM is identical to TTF 2 PT1 except that it also generates a .ufm file Chris@909: for usage with makefontuni.php or makefontuni.rb. Chris@909: Chris@909: Chris@909: Setting up a Truetype font for usage with UFPDF: Chris@909: 1) Generate the font's .ufm metrics file by processing it with the provided Chris@909: ttf2ufm program (modified ttf2pt1). For example: Chris@909: $ ttf2ufm -a -F myfont.ttf Chris@909: Chris@909: 2) Run makefontuni_ruby.php with the .ttf and .ufm filenames as argument: Chris@909: $ php -q makefontuni_ruby.php myfont.ttf myfont.ufm Chris@909: Chris@909: 3) Copy the resulting .rb, .z and .ctg.z file to the TCPDF font directory. Chris@909: Chris@909: 4) Rename php font files variations for bold and italic using the following schema: Chris@909: [basic-font-name]b.rb for bold variation Chris@909: [basic-font-name]i.rb for oblique variation Chris@909: [basic-font-name]bi.rb for bold oblique variation Chris@909: Chris@909: 5) Rename the name of the font in the first line of each .rb file: Chris@909: TCPDFFontDescriptor.define('dtlargotitalic') do |font| Chris@909: becomes: Chris@909: TCPDFFontDescriptor.define('dtlargoti') do |font|