#287 Add font custom path

open
nobody
1
12 hours ago
2013-08-30
No

It will be great if TCPDF could set a custom fonts path, so when use SetFont or something like:

$html='<span style="font-family: customfont;">my text in bold</span>: my normal text';
$pdf->writeHTMLCell($w=0,$h=0,$x=11,$y=201,$html,$border=0,$ln=0,$fill=false,$reseth=true,$align='L',$autopadding=false);

will not be limited to only use fonts defined in:

  1. They are in the current directory (the one where the running script lies)
  2. They are in one of the directories defined by the include_path parameter
  3. They are in the directory defined by the K_PATH_FONTS constant

with this is possible users upload fonts, convert and use it using custom folders

I think something like:

AddFontPath('<FONT_PATH>');

or an static method:

TCPDF::AddFontPath('<FONT_PATH>');

Discussion