You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by SASAKI Suguru <s-...@hkg.odn.ne.jp> on 2001/08/05 09:14:55 UTC
[PATCH] Support for lazy-loading of metrics file
Hi.
Current Fop loads all font metrics files in startup , even if
corresponding fonts are not used in FO document. This wastes
memory and time, when not all registered fonts are used in FO
(that is, I guess, almost always). So, metrics files should be
lazy-loaded.
In Attatched patch, lazy-loading in PDFRenderer is implemented.
Changes:
1. add org/apache/fop/render/pdf/fonts/LazyFont.java
(wrapper for Multi/SingleByteFont)
2. In startup, add LazyFont to FontInfo.
When metrics file is needed, LazyFont loads it automatically.
When embeding font, get "real" font (Multi/SingleByteFont)
instance thorough LazyFont.getRealFont() and output as before.
Regards.
=======
SASAKI Suguru
mailto : s-sasaki@hkg.odn.ne.jp
Re: [PATCH] Support for lazy-loading of metrics file
Posted by Keiron Liddle <ke...@aftexsw.com>.
Looks fine to me. So I have committed it (with some minor modifications).
Good stuff.
On Sun, 05 Aug 2001 09:14:55 SASAKI Suguru wrote:
>
> Hi.
>
> Current Fop loads all font metrics files in startup , even if
> corresponding fonts are not used in FO document. This wastes
> memory and time, when not all registered fonts are used in FO
> (that is, I guess, almost always). So, metrics files should be
> lazy-loaded.
>
> In Attatched patch, lazy-loading in PDFRenderer is implemented.
> Changes:
> 1. add org/apache/fop/render/pdf/fonts/LazyFont.java
> (wrapper for Multi/SingleByteFont)
> 2. In startup, add LazyFont to FontInfo.
> When metrics file is needed, LazyFont loads it automatically.
> When embeding font, get "real" font (Multi/SingleByteFont)
> instance thorough LazyFont.getRealFont() and output as before.
>
> Regards.
>
> =======
> SASAKI Suguru
> mailto : s-sasaki@hkg.odn.ne.jp
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org