<html> <body style="margin: 0; padding: 0"> <div style="width: 2in; height: 2in; border: 1pt solid blue;”> <span style="font-size: 0.5in">Hel</span>lo </div> </body> </html>
Use the OS X command line tool wkhtmltopdf to convert the document to pdf
wkhtmltopdf -B 0 -T 0 -L 0 -R 0 --page-width 2in --page-height 2in box.html box.pdf
The fonts in this are embedded (or likely to be). To replace the fonts with text outlines use
gs -sDEVICE=ps2write -dNOCACHE -sOutputFile=- -q -dbatch -dNOPAUSE -dQUIET box.pdf -c quit | ps2pdf - box-nofont.pdf
Done.