You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by kennardconsulting <ri...@kennardconsulting.com> on 2009/09/25 06:02:59 UTC

Any way to cache fonts across rendering runs?

Hi guys,

FOP 'best practice' says that I should call FopFactory.newFop at the start
of each render. Internally, however, this creates a new FOTreeBuilder, which
in turn creates a FOEventHandler, which in turn creates a FontInfo, which in
turn has a font cache.

Is there no way to re-use this font cache across multiple rendering runs?

I note in my logs that FOP keeps going looking for various
uppercase/lowercase versions of filenames on the disk...

13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
file:/N:/var/avant-ss/fonts/TheSnB3.AFM
13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
file:/N:/var/avant-ss/fonts/TheSnB3.afm
13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
file:/N:/var/avant-ss/fonts/TheSnB3.Afm
13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
file:/N:/var/avant-ss/fonts/TheSnB6.AFM
13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
file:/N:/var/avant-ss/fonts/TheSnB6.afm
13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
file:/N:/var/avant-ss/fonts/TheSnB6.Afm

...doing this every time can't be good for performance?

Regards,

Richard.
-- 
View this message in context: http://www.nabble.com/Any-way-to-cache-fonts-across-rendering-runs--tp25606243p25606243.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Any way to cache fonts across rendering runs?

Posted by kennardconsulting <ri...@kennardconsulting.com>.
Jeremias,

Understood. Thank you so much for your prompt reply, and for all your work
to date on FOP.

I will keep an eye on the announcements for when/if such an improvement
becomes available. I wish you and the contributor luck (and my gratitude) in
implementing it!

Regards,

Richard.


-- 
View this message in context: http://www.nabble.com/Any-way-to-cache-fonts-across-rendering-runs--tp25606243p25607112.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Any way to cache fonts across rendering runs?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You've noticed a flaw in FOP that we've been aware of for quite some
time. We've also already discussed possible approaches to improve this.
The problem: so far, it wasn't a big enough issue to anyone to dive into
it. A contributor is currently refactoring the loading of TrueType/OpenType
fonts (on fop-dev). Maybe that's one step in the direction of improving
the situation. I guess the main problem is the current inability to keep
the font metrics (static, cacheable) separate from the font subset
information (per-document).

On 25.09.2009 06:02:59 kennardconsulting wrote:
> 
> Hi guys,
> 
> FOP 'best practice' says that I should call FopFactory.newFop at the start
> of each render. Internally, however, this creates a new FOTreeBuilder, which
> in turn creates a FOEventHandler, which in turn creates a FontInfo, which in
> turn has a font cache.
> 
> Is there no way to re-use this font cache across multiple rendering runs?
> 
> I note in my logs that FOP keeps going looking for various
> uppercase/lowercase versions of filenames on the disk...
> 
> 13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
> file:/N:/var/avant-ss/fonts/TheSnB3.AFM
> 13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
> file:/N:/var/avant-ss/fonts/TheSnB3.afm
> 13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
> file:/N:/var/avant-ss/fonts/TheSnB3.Afm
> 13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
> file:/N:/var/avant-ss/fonts/TheSnB6.AFM
> 13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
> file:/N:/var/avant-ss/fonts/TheSnB6.afm
> 13:56:51,046 http-127.0.0.1-8080-1 DEBUG [FOP] File not found:
> file:/N:/var/avant-ss/fonts/TheSnB6.Afm
> 
> ...doing this every time can't be good for performance?
> 
> Regards,
> 
> Richard.
> -- 
> View this message in context: http://www.nabble.com/Any-way-to-cache-fonts-across-rendering-runs--tp25606243p25606243.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org