2010/1/25 1T3XT info <i...@1t3xt.info>

> 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 ;-)
>

Ok, but before question on the forum I am trying to find solution myself.
ALWAYS.
iText is very big project, and this is my first try with iText.


> > 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!
>

I have seen it and therefore I have asked here...


>
> 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.
>
>
I know directories and i know how to read list of the files in directories
... but I do not like  to hardcode it...

Then do something like this:
>
> for (String f : FontFactory.getRegisteredFonts()) {
>   document.add(new Paragraph(f,
>     FontFactory.getFont(f, "", BaseFont.EMBEDDED)));
> }
>
>   This is very good answer - THANK YOU VERY MUCH.


Regards
Mariusz
------------------------------------------------------------------------------
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