Paulo Soares wrote:
> Did you registered the font?

Yes. Let's take an example. If I do:

   String fontsDir = "c:\\WINDOWS\\Fonts";
   FontFactory.getFontImp().registerDirectory(fontsDir);
   DefaultFontMapper fm = new DefaultFontMapper();
   fm.insertDirectory(fontsDir);
   BaseFont f1 = FontFactory.getFont("Arial", 12, 
com.lowagie.text.Font.BOLD).getBaseFont();
   BaseFont f2 = fm.awtToPdf(new java.awt.Font("Arial", java.awt.Font.BOLD, 12);
   System.out.println(f1.equals(f2));

(I assume the iText Graphics2D object will call awt2Pdf under the cover)
I can clearly see that they are not the same font. The book is vague
on this IMO: the font chapters were not written with Java2D in mind
and it's not clear how to get the font you want when using iText
through Java2D.

-- O.L.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to