You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael McGrady <mi...@michaelmcgrady.com> on 2004/10/14 02:38:11 UTC

Temp files being printed each time a font is loaded to create a button: Why Oh Why?

I have an applicaton which uses various fonts which are loaded as follows:


      File file = new File(Classpath.WEB_INF +
                      "resource"        + File.separator +
                      "content_type"    + File.separator +
                      "ttf"             + File.separator +
                       physicalName);
      FileInputStream fontStream = new FileInputStream(file);
      Font font = Font.createFont(Font.TRUETYPE_FONT,fontStream);
      font = font.deriveFont(attributes);
      fontStream.close();

This is resulting in temp files around 50 - 150 kilobytes being written 
to the tomcat direetory each time I employ this code.  Why would that be 
and what can I do about it? 

Michael McGrady



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Temp files being printed each time a font is loaded to create a button: Why Oh Why?

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Sorry, should have added: Tomcat 5, Struts 1.2, data being transferred 
inside a custom taglib.

Michael McGrady wrote:

> I have an applicaton which uses various fonts which are loaded as 
> follows:
>
>
>      File file = new File(Classpath.WEB_INF +
>                      "resource"        + File.separator +
>                      "content_type"    + File.separator +
>                      "ttf"             + File.separator +
>                       physicalName);
>      FileInputStream fontStream = new FileInputStream(file);
>      Font font = Font.createFont(Font.TRUETYPE_FONT,fontStream);
>      font = font.deriveFont(attributes);
>      fontStream.close();
>
> This is resulting in temp files around 50 - 150 kilobytes being 
> written to the tomcat direetory each time I employ this code.  Why 
> would that be and what can I do about it?
> Michael McGrady
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> .
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org