Use the getFont() that has the 'cached' parameter.
Paulo
> -----Original Message-----
> From: David Thielen [mailto:da...@windward.net]
> Sent: Thursday, July 16, 2009 6:08 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Clear out font cache?
>
> Hi;
>
>
>
> Our mail server burped this morning so if anyone posted an
> answer to this, can you please re-post?
>
>
>
> Thanks - dave
>
>
>
>
>
> David Thielen
> 303-499-2544 x1185
> 720-352-0676 (cell)
>
> www.windwardreports.com <http://www.windwardreports.com/>
>
>
>
> From: David Thielen [mailto:da...@windward.net]
> Sent: Wednesday, July 15, 2009 11:58 PM
> To: itext
> Subject: [iText-questions] Clear out font cache?
>
>
>
> Hi;
>
>
>
> To list out all fonts, including all their properties, I do
> the following:
>
>
>
> String[] arr = new String[FontFactory.getRegisteredFonts().size()];
> for (int ind=0; ind<arr.length; ind++) {
> BaseFont bf = FontFactory.getFont(arr[ind]).getBaseFont();
>
> ....
>
>
>
> This eats up a ton of memory if there are lots of fonts on a
> system. I assume this is loading up an internal cache. I call
> System.gc() every 10 fonts, but it still will run out of
> memory on some systems.
>
>
>
> Is there a way to flush the font cache?
>
>
>
> thanks - dave
>
>
>
>
>
>
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
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/