Index: vcl/source/glyphs/gcach_ftyp.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v
retrieving revision 1.130
diff -u -p -u -r1.130 gcach_ftyp.cxx
--- vcl/source/glyphs/gcach_ftyp.cxx	3 Aug 2006 15:00:40 -0000	1.130
+++ vcl/source/glyphs/gcach_ftyp.cxx	23 Aug 2006 16:19:27 -0000
@@ -306,6 +313,8 @@ FtFontInfo::FtFontInfo( const ImplDevFon
     mnSynthetic( nSynthetic ),
     mnFontId( nFontId ),
     maDevFontAttributes( rDevFontAttributes ),
+	mpChar2Glyph( NULL ),
+	mpGlyph2Char( NULL ),
     mpExtraKernInfo( pExtraKernInfo )
 {
     // prefer font with low ID
@@ -315,6 +324,14 @@ FtFontInfo::FtFontInfo( const ImplDevFon
 FtFontInfo::~FtFontInfo()
 {
     delete mpExtraKernInfo;
+	delete mpChar2Glyph;
+	delete mpGlyph2Char;
+}
+
+void FtFontInfo::InitHashes() const
+{
+	((FtFontInfo *)this)->mpChar2Glyph = new Int2IntMap();
+	((FtFontInfo *)this)->mpGlyph2Char = new Int2IntMap();
 }
 
 // -----------------------------------------------------------------------
@@ -383,8 +406,8 @@ int FtFontInfo::GetExtraGlyphKernValue( 
 {
     if( !mpExtraKernInfo )
         return 0;
-    sal_Unicode cLeftChar   = maGlyph2Char[ nLeftGlyph ];
-    sal_Unicode cRightChar  = maGlyph2Char[ nRightGlyph ];
+    sal_Unicode cLeftChar   = (*mpGlyph2Char)[ nLeftGlyph ];
+    sal_Unicode cRightChar  = (*mpGlyph2Char)[ nRightGlyph ];
     return mpExtraKernInfo->GetUnscaledKernValue( cLeftChar, cRightChar );
 }
 
Index: vcl/source/glyphs/gcach_ftyp.hxx
===================================================================
RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.hxx,v
retrieving revision 1.36
diff -u -p -u -r1.36 gcach_ftyp.hxx
--- vcl/source/glyphs/gcach_ftyp.hxx	19 Jun 2006 19:32:37 -0000	1.36
+++ vcl/source/glyphs/gcach_ftyp.hxx	23 Aug 2006 16:19:27 -0000
@@ -122,8 +122,9 @@ private:
     // cache unicode->glyphid mapping because looking it up is expensive
     // TODO: change to hash_multimap when a use case requires a m:n mapping
     typedef ::std::hash_map<int,int> Int2IntMap;
-    mutable Int2IntMap maChar2Glyph;
-    mutable Int2IntMap maGlyph2Char;
+    mutable Int2IntMap *mpChar2Glyph;
+    mutable Int2IntMap *mpGlyph2Char;
+	void InitHashes() const;
 
     const ExtraKernInfo* mpExtraKernInfo;
 };
@@ -132,16 +133,20 @@ private:
 
 inline int FtFontInfo::GetGlyphIndex( sal_UCS4 cChar ) const
 {
-    Int2IntMap::const_iterator it = maChar2Glyph.find( cChar );
-    if( it == maChar2Glyph.end() )
+	if (!mpChar2Glyph)
+		return -1;
+    Int2IntMap::const_iterator it = mpChar2Glyph->find( cChar );
+    if( it == mpChar2Glyph->end() )
         return -1;
     return it->second;
 }
 
 inline void FtFontInfo::CacheGlyphIndex( sal_UCS4 cChar, int nIndex ) const
 {
-    maChar2Glyph[ cChar ] = nIndex;
-    maGlyph2Char[ nIndex ] = cChar;
+	if (!mpChar2Glyph)
+		InitHashes();
+    (*mpChar2Glyph)[ cChar ] = nIndex;
+    (*mpGlyph2Char)[ nIndex ] = cChar;
 }
 
 // -----------------------------------------------------------------------
