TCPDF字体开关

I've been looking around the TCPDF docs (http://www.tcpdf.org/doc/code/classTCPDF.html) and can't find the solution to this issue anywhere.

How do I output a string on the PDF with mixed fonts? ie. let's say I want to output "hello world" but to have "hello" outputed using one font and "world" outputed other font.

I know how to do it in 2 different tries, ie. pick one font, echo 1 word, pick other font, echo other word. But is there a way to somehow do it all at once?

My issue is with echoing out centered HTML spans. I have 2 spans outputed using writeHTMLCell function where one span should be outputed using one font and the second one using the other font.

Can I maybe do this using TCPDF CSS?

Basically, I'm looking for a way to have centered text within a box with invisible borders, and 1 word of the text is outputed using 1 font / color, and the other word using other font / color.

Thanks!

EDIT: btw: I'm using custom font imported via addTTFfont function.

This anwser found on stackoverflow.com solved my issue => TCPDF Codeigniter use multiple fonts

Truns out custom fonts can be defined through CSS.