The definition file (and the font file itself when embedding) must be present either in the current directory or in the one indicated by K_PATH_FONTS if the constant is defined. It is necessary to generate a font definition file first (read /fonts/utils/README.TXT). ![]() Imports a TrueType, Type1, core, or CID0 font and makes it available. So in your case, if you add a TTF font TCPDF should recognize when it is used and embed the font definition automatically.Īlso, you should only have to do $fontname = $pdf->addTTFfont('/fonts/arial.ttf', '', '', 32) once, so you could run your script once, and then comment that line out.ĭirect From the documentation AddFont( $family, $style = '', $fontfile = '', $subset = 'default' ) ![]() ![]() ![]() I'm fairly certain it's presumed that most all OS's have Times, Helvetica and Courier already available and therefore TCPDF does not embed them. TCPDF will just automatically embed fonts you've added on its own.
0 Comments
Leave a Reply. |