Mariusz Dec wrote:
> How to obtain physical filename of the font visible on the list obtained 
> as mentioned above?
> 
> I have searched the web but I have found only this information:

Searching the web is more frustrating than consulting the book about 
iText... I'm always surprised when people choose to lose time on the web 
when there's that much information available in the book ;-)

> http://java.sun.com/j2se/1.4.2/docs/guide/intl/fontprop.html.

That's about Java fonts, not about the font files available on your system!

Use FontFactory.registerDirectories(); This will register all the fonts 
on your OS that are in "predictable directories" such as 
c:/windows/fonts on Windows, /Library/Fonts on Mac, or /usr/share/fonts 
on Linux.

Then do something like this:

for (String f : FontFactory.getRegisteredFonts()) {
   document.add(new Paragraph(f,
     FontFactory.getFont(f, "", BaseFont.EMBEDDED)));
}

If I do this on my PC, I get an enormous list of font names I can use.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to