getFont
public static Font getFont(String fontname,
                           String encoding,
                           boolean embedded,
                           float size,
                           int style,
                           Color color,
                           boolean cached)Constructs a Font-object.


    Parameters:
    fontname - the name of the font
    encoding - the encoding of the font
    embedded - true if the font is to be embedded in the PDF
    size - the size of this font
    style - the style of this font
    color - the Color of this font.
    cached - true if the font comes from the cache or is added to the cache 
if new, false if the font is always created new
    Returns:
    the Font constructed based on the parameters

Paulo


----- Original Message ----- 
From: "David Thielen" <da...@windward.net>
To: "Post all your questions about iText here" 
<itext-questions@lists.sourceforge.net>
Sent: Thursday, July 16, 2009 8:08 PM
Subject: Re: [iText-questions] Clear out font cache?


Hi;

I'm looking at http://www.1t3xt.info/api/ and don't see a getFont() where 
one of the params is cached. Is this done by passing Properties to getFont() 
and if so, what are the name/value pairs for that?

Thanks - dave


David Thielen
303-499-2544 x1185
720-352-0676 (cell)
www.windwardreports.com


-----Original Message-----
From: Paulo Soares [mailto:psoa...@glintt.com]
Sent: Thursday, July 16, 2009 11:50 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Clear out font cache?

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


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

Reply via email to