1

I have successfully added the font trebuc.
I have these lines to declare the fonts (I only need normal and bold)

$pdf->AddFont('trebuc','trebuc.php');
$pdf->AddFont('trebuc','B','trebucbd.php');


And I set the trebuc as default font like this:

$pdf->setDefaultFont('trebuc');

When I do this, everything become "trebuc normal" and tags like <b> or <strong> are ignored.
I tried the v3 in the past where I could add the font like this:
$pdf->SetFont('trebuc','',10);
It would cover both normal and bold for the div.

Bonne journée :-)

When I use the standard fonts I don't have this problem.
html2pdf 4.03

2

I found the solution. Inspired by this post: http://www.xml-convert.com/en/convert-tff-font-to-afm-pfa-fpdf-tcpdf
Where I read that the naming of the bold font should be with just an"i" after the name and not "it" as I did. I copy part of the post:

[basic-font-name-in-lowercase].php for regular font
[basic-font-name-in-lowercase]b.php for bold variation
[basic-font-name-in-lowercase]i.php for oblique variation
[basic-font-name-in-lowercase]bi.php for bold oblique variation

So basically the wiki information could be made much simpler to understand, at least for Windows users:

Copy the font you want to use from the Windows/fonts folder to folder where you can read and write without trouble (I copied to a folder on my desktop).

Go to this site
http://www.xml-convert.com/en/convert-tff-font-to-afm-pfa-fpdf-tcpdf
and enter the filename respecting the indications on the top of this post (lowercase, file name endings).

Copy the resulting files to the html2pder/tcpdf/fonts folder.
Without any changes of config files or other, I got Trebuchet MS to work with HTML2PDF in normal, bold and italic font.

I don't know how to change the topic to "solved"? Admin, please help ;-)
html2pdf 4.03