rpms/openoffice.org/devel openoffice.org-1.9.104-use-fontconfig-everywhere.patch, 1.11, 1.12 openoffice.org.spec, 1.364, 1.365

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Aug 2 12:32:14 UTC 2005


Author: caolanm

Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv5943

Modified Files:
	openoffice.org-1.9.104-use-fontconfig-everywhere.patch 
	openoffice.org.spec 
Log Message:
faster alternative

openoffice.org-1.9.104-use-fontconfig-everywhere.patch:
 inc/outdev.h                              |    0 
 inc/outfont.hxx                           |    0 
 inc/psprint/fontmanager.hxx               |    0 
 psprint/inc/psprint/fontmanager.hxx       |    4 
 psprint/source/fontmanager/fontcache.cxx  |    2 
 psprint/source/fontmanager/fontconfig.cxx |   32 +-
 source/fontmanager/fontcache.cxx          |    0 
 source/fontmanager/fontconfig.cxx         |    0 
 source/gdi/outdev3.cxx                    |    0 
 util/makefile.mk                          |    0 
 vcl/inc/outdev.h                          |    3 
 vcl/inc/outfont.hxx                       |   15 +
 vcl/source/gdi/outdev3.cxx                |  422 +++++++++++++++++++++++-------
 vcl/util/makefile.mk                      |    2 
 14 files changed, 381 insertions(+), 99 deletions(-)

Index: openoffice.org-1.9.104-use-fontconfig-everywhere.patch
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org-1.9.104-use-fontconfig-everywhere.patch,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- openoffice.org-1.9.104-use-fontconfig-everywhere.patch	2 Aug 2005 07:35:33 -0000	1.11
+++ openoffice.org-1.9.104-use-fontconfig-everywhere.patch	2 Aug 2005 12:32:05 -0000	1.12
@@ -1,10 +1,179 @@
+Index: inc/psprint/fontmanager.hxx
+===================================================================
+RCS file: /cvs/gsl/psprint/inc/psprint/fontmanager.hxx,v
+retrieving revision 1.22
+diff -u -p -u -r1.22 fontmanager.hxx
+--- openoffice.org.orig/psprint/inc/psprint/fontmanager.hxx	31 Jan 2005 08:58:54 -0000	1.22
++++ openoffice.org/psprint/inc/psprint/fontmanager.hxx	2 Aug 2005 12:25:32 -0000
+@@ -79,7 +79,7 @@
+ #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+ #include <com/sun/star/lang/Locale.hpp>
+ #endif
+-
++#include <fontconfig/fontconfig.h>
+ #define ATOM_FAMILYNAME                     2
+ #define ATOM_PSNAME                         3
+ 
+@@ -415,6 +415,7 @@ class PrintFontManager
+     std::hash_multimap< sal_uInt8, sal_Unicode >	m_aAdobecodeToUnicode;
+ 
+     mutable FontCache*							m_pFontCache;
++    FcFontSet *mpOutlineSet;
+         
+     rtl::OString getAfmFile( PrintFont* pFont ) const;
+     rtl::OString getFontFile( PrintFont* pFont ) const;
+@@ -468,6 +469,7 @@ class PrintFontManager
+     ~PrintFontManager();
+ public:
+     static PrintFontManager& get(); // one instance only
++    FcFontSet* getFontSet() { return mpOutlineSet; }
+ 
+     int addFontFile( const rtl::OString& rFileName, int nFaceNum ); 
+ 
+Index: source/fontmanager/fontcache.cxx
+===================================================================
+RCS file: /cvs/gsl/psprint/source/fontmanager/fontcache.cxx,v
+retrieving revision 1.13
+diff -u -p -u -r1.13 fontcache.cxx
+--- openoffice.org.orig/psprint/source/fontmanager/fontcache.cxx	6 Jun 2005 16:07:21 -0000	1.13
++++ openoffice.org/psprint/source/fontmanager/fontcache.cxx	2 Aug 2005 12:25:32 -0000
+@@ -703,9 +703,9 @@ bool FontCache::getFontCacheFile( int nD
+         FontDirMap::const_iterator entry = dir->second.m_aEntries.find( rFile );
+         if( entry != dir->second.m_aEntries.end() )
+         {
+-            bSuccess = true;
+             for( FontCacheEntry::const_iterator font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font )
+             {
++                bSuccess = true;
+                 PrintFontManager::PrintFont* pFont = clonePrintFont( *font );
+                 rNewFonts.push_back( pFont );
+             }
+Index: source/fontmanager/fontconfig.cxx
+===================================================================
+RCS file: /cvs/gsl/psprint/source/fontmanager/fontconfig.cxx,v
+retrieving revision 1.7
+diff -u -p -u -r1.7 fontconfig.cxx
+--- openoffice.org.orig/psprint/source/fontmanager/fontconfig.cxx	13 Oct 2004 08:22:03 -0000	1.7
++++ openoffice.org/psprint/source/fontmanager/fontconfig.cxx	2 Aug 2005 12:25:32 -0000
+@@ -116,12 +116,13 @@ class FontCfgWrapper
+     FcFontSet*		(*m_pFcFontSetCreate)();
+     void			(*m_pFcFontSetDestroy)(FcFontSet*);
+     FcBool			(*m_pFcFontSetAdd)(FcFontSet*,FcPattern*);
++    void            (*m_pFcPatternReference)(FcPattern*);
+     FcResult		(*m_pFcPatternGetString)(const FcPattern*,const char*,int,FcChar8**);
+     FcResult		(*m_pFcPatternGetInteger)(const FcPattern*,const char*,int,int*);
+     FcResult		(*m_pFcPatternGetDouble)(const FcPattern*,const char*,int,double*);
+     FcResult		(*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*);
+     void			(*m_pFcDefaultSubstitute)(FcPattern *);
+-    FcPattern*		(*m_pFcFontMatch)(FcConfig*,FcPattern*,FcResult*);    
++    FcPattern*      (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*);
+     FcBool			(*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind);
+     FcBool			(*m_pFcPatternAddInteger)(FcPattern*,const char*,int);
+     FcBool			(*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*);
+@@ -164,14 +165,19 @@ public:
+     
+     FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet )
+     { return m_pFcFontList( pConfig, pPattern, pSet ); }
+-    
++
+     FcFontSet* FcFontSetCreate()
+     { return m_pFcFontSetCreate(); }
++
+     void FcFontSetDestroy( FcFontSet* pSet )
+     { m_pFcFontSetDestroy( pSet );}
++
+     FcBool FcFontSetAdd( FcFontSet* pSet, FcPattern* pPattern )
+     { return m_pFcFontSetAdd( pSet, pPattern ); }
+ 
++    void FcPatternReference( FcPattern* pPattern )
++    { m_pFcPatternReference( pPattern ); }
++
+     FcResult FcPatternGetString( const FcPattern* pPattern, const char* object, int n, FcChar8** s )
+     { return m_pFcPatternGetString( pPattern, object, n, s ); }
+ 
+@@ -185,8 +191,8 @@ public:
+     { return m_pFcPatternGetBool( pPattern, object, n, s ); }
+     void FcDefaultSubstitute( FcPattern* pPattern )
+     { m_pFcDefaultSubstitute( pPattern ); }
+-    FcPattern* FcFontMatch( FcConfig* pConfig, FcPattern* pPattern, FcResult* pResult )
+-    { return m_pFcFontMatch( pConfig, pPattern, pResult ); }
++    FcPattern* FcFontSetMatch(FcConfig* pConfig, FcFontSet** ppFontSet, int nset, FcPattern *pPattern, FcResult *pResult)
++    { return m_pFcFontSetMatch( pConfig, ppFontSet, nset, pPattern, pResult ); }
+     FcBool FcConfigSubstitute( FcConfig* pConfig, FcPattern* pPattern, FcMatchKind eKind )
+     { return m_pFcConfigSubstitute( pConfig, pPattern, eKind ); }
+     FcBool FcPatternAddInteger( FcPattern* pPattern, const char* pObject, int nValue )
+@@ -245,6 +251,8 @@ FontCfgWrapper::FontCfgWrapper()
+         loadSymbol( "FcFontSetDestroy" );
+     m_pFcFontSetAdd = (FcBool(*)(FcFontSet*,FcPattern*))
+         loadSymbol( "FcFontSetAdd" );
++    m_pFcPatternReference = (void(*)(FcPattern*))
++        loadSymbol( "FcPatternReference" );
+     m_pFcPatternGetString = (FcResult(*)(const FcPattern*,const char*,int,FcChar8**))
+         loadSymbol( "FcPatternGetString" );
+     m_pFcPatternGetInteger = (FcResult(*)(const FcPattern*,const char*,int,int*))
+@@ -255,8 +263,8 @@ FontCfgWrapper::FontCfgWrapper()
+         loadSymbol( "FcPatternGetBool" );
+     m_pFcDefaultSubstitute = (void(*)(FcPattern *))
+         loadSymbol( "FcDefaultSubstitute" );
+-    m_pFcFontMatch = (FcPattern*(*)(FcConfig*,FcPattern*,FcResult*))
+-        loadSymbol( "FcFontMatch" );
++    m_pFcFontSetMatch = (FcPattern*(*)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*))
++        loadSymbol( "FcFontSetMatch" );
+     m_pFcConfigSubstitute = (FcBool(*)(FcConfig*,FcPattern*,FcMatchKind))
+         loadSymbol( "FcConfigSubstitute" );
+     m_pFcPatternAddInteger = (FcBool(*)(FcPattern*,const char*,int))
+@@ -274,12 +282,13 @@ FontCfgWrapper::FontCfgWrapper()
+             m_pFcFontSetCreate				&&
+             m_pFcFontSetDestroy				&&
+             m_pFcFontSetAdd					&&
++            m_pFcPatternReference           &&
+             m_pFcPatternGetString			&&
+             m_pFcPatternGetInteger			&&
+             m_pFcPatternGetDouble			&&
+             m_pFcPatternGetBool				&&
+             m_pFcDefaultSubstitute			&&
+-            m_pFcFontMatch					&&
++            m_pFcFontSetMatch				&&
+             m_pFcConfigSubstitute			&&
+             m_pFcPatternAddInteger			&&
+             m_pFcPatternAddString
+@@ -336,6 +345,8 @@ bool PrintFontManager::initFontconfig()
+     if( ! rWrapper.isValid() )
+         return false;
+ 
++    mpOutlineSet = rWrapper.FcFontSetCreate();
++
+     FcConfig* pConfig = rWrapper.getDefConfig();
+     FcObjectSet* pOSet = rWrapper.FcObjectSetBuild( FC_FAMILY,
+                                                     FC_STYLE,
+@@ -394,6 +405,11 @@ bool PrintFontManager::initFontconfig()
+             if( eOutRes == FcResultMatch && ! outline )
+                 continue;
+ 
++			/*cmc add only acceptable fonts to our config, for future fontconfig use*/
++            FcPattern *pOutlinePattern = pFSet->fonts[i];
++            rWrapper.FcPatternReference(pOutlinePattern);
++            rWrapper.FcFontSetAdd(mpOutlineSet, pOutlinePattern);
++
+             // see if this font is already cached
+             // update attributes
+             std::list< PrintFont* > aFonts;
+@@ -645,7 +661,7 @@ bool PrintFontManager::matchFont( FastPr
+     rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern );
+     rWrapper.FcDefaultSubstitute( pPattern );
+     FcResult eResult = FcResultNoMatch;
+-    FcPattern* pResult = rWrapper.FcFontMatch( pConfig, pPattern, &eResult );
++    FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &mpOutlineSet, 1, pPattern, &eResult );
+     bool bSuccess = false;
+     if( pResult )
+     {
 Index: inc/outdev.h
 ===================================================================
 RCS file: /cvs/gsl/vcl/inc/outdev.h,v
 retrieving revision 1.17
-diff -u -p -r1.17 outdev.h
+diff -u -p -u -r1.17 outdev.h
 --- openoffice.org.orig/vcl/inc/outdev.h	9 Nov 2004 16:32:20 -0000	1.17
-+++ openoffice.org/vcl/inc/outdev.h	8 Jul 2005 16:26:15 -0000
++++ openoffice.org/vcl/inc/outdev.h	2 Aug 2005 12:26:17 -0000
 @@ -239,7 +239,8 @@ public:
                               const Font& rFont, const Size& rSize, ImplFontSubstEntry* pDevSpecific );
      ImplFontEntry*      GetFallback( ImplDevFontList* pFontList,
@@ -19,9 +188,9 @@
 ===================================================================
 RCS file: /cvs/gsl/vcl/inc/outfont.hxx,v
 retrieving revision 1.17
-diff -u -p -r1.17 outfont.hxx
+diff -u -p -u -r1.17 outfont.hxx
 --- openoffice.org.orig/vcl/inc/outfont.hxx	31 Jan 2005 09:15:19 -0000	1.17
-+++ openoffice.org/vcl/inc/outfont.hxx	8 Jul 2005 16:26:15 -0000
++++ openoffice.org/vcl/inc/outfont.hxx	2 Aug 2005 12:26:18 -0000
 @@ -252,6 +252,7 @@ public:
      ImplDevFontListData*    FindFontFamily( const String& rFontName ) const;
      ImplDevFontListData*    ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplFontSubstEntry* pDevSpecificSubst ) const;
@@ -61,10 +230,10 @@
 Index: source/gdi/outdev3.cxx
 ===================================================================
 RCS file: /cvs/gsl/vcl/source/gdi/outdev3.cxx,v
-retrieving revision 1.200
-diff -u -p -r1.200 outdev3.cxx
---- openoffice.org.orig/vcl/source/gdi/outdev3.cxx	18 May 2005 08:04:00 -0000	1.200
-+++ openoffice.org/vcl/source/gdi/outdev3.cxx	8 Jul 2005 16:26:43 -0000
+retrieving revision 1.202
+diff -u -p -u -r1.202 outdev3.cxx
+--- openoffice.org.orig/vcl/source/gdi/outdev3.cxx	14 Jul 2005 12:36:51 -0000	1.202
++++ openoffice.org/vcl/source/gdi/outdev3.cxx	2 Aug 2005 12:26:33 -0000
 @@ -185,6 +185,10 @@
  #include <memory>
  #include <algorithm>
@@ -76,7 +245,7 @@
  // =======================================================================
  
  DBG_NAMEEX( OutputDevice );
-@@ -2670,6 +2674,197 @@ ImplFontCache::~ImplFontCache()
+@@ -2668,6 +2672,198 @@ ImplFontCache::~ImplFontCache()
      }
  }
  
@@ -217,7 +386,8 @@
 +    FcConfigSubstitute( NULL, pPattern, FcMatchPattern );
 +    FcDefaultSubstitute( pPattern );
 +    FcResult eResult = FcResultNoMatch;
-+    FcPattern* pResult = FcFontMatch( rMgr.getFontconfig(), pPattern, &eResult );
++    FcFontSet *pOutlines = psp::PrintFontManager::get().getFontSet();
++    FcPattern* pResult = FcFontSetMatch( NULL, &pOutlines, 1, pPattern, &eResult );
 +    FcPatternDestroy( pPattern );
 +
 +    if( pResult )
@@ -274,7 +444,7 @@
  // -----------------------------------------------------------------------
  
  ImplFontEntry* ImplFontCache::Get( ImplDevFontList* pFontList,
-@@ -2707,8 +2889,12 @@ ImplFontEntry* ImplFontCache::Get( ImplD
+@@ -2705,8 +2901,12 @@ ImplFontEntry* ImplFontCache::Get( ImplD
  
      if( !pEntry ) // no direct cache hit
      {
@@ -289,7 +459,7 @@
          DBG_ASSERT( (pFontFamily != NULL), "ImplFontCache::Get() No logical font found!" );
          aFontSelData.maSearchName = pFontFamily->GetSearchName();
  
-@@ -3028,109 +3214,122 @@ ImplDevFontListData* ImplDevFontList::Im
+@@ -3026,109 +3226,122 @@ ImplDevFontListData* ImplDevFontList::Im
  // -----------------------------------------------------------------------
  
  ImplFontEntry* ImplFontCache::GetFallback( ImplDevFontList* pFontList,
@@ -380,7 +550,9 @@
 +        if ( aSelData.maSearchName.Len() )
 +            cached = true;
 +    }
-+
+ 
+-            // keep the best font of the glyph fallback sub-list
+-            if( nBestQuality < pFallbackFont->GetMinQuality() )
 +    if ( !cached )
 +    {
 +        FcFontSet*  pSet = NULL;
@@ -391,9 +563,7 @@
 +        {
 +            if( FcPatternGetString( pSet->fonts[0], FC_FAMILY, 0, &family ) == FcResultMatch )
 +                aSelData.maSearchName = String( (sal_Char*)family, RTL_TEXTENCODING_UTF8 );
- 
--            // keep the best font of the glyph fallback sub-list
--            if( nBestQuality < pFallbackFont->GetMinQuality() )
++
 +            FcFontSetDestroy( pSet );
 +        #if 0
 +            ByteString n( aOrigFontName, RTL_TEXTENCODING_UTF8);
@@ -495,7 +665,7 @@
      if( pFallbackFont && !pFallbackFont->mbInit )
      {
          // HACK: maMetrics are irrelevant for fallback fonts, but
-@@ -3139,6 +3338,27 @@ ImplFontEntry* ImplFontCache::GetFallbac
+@@ -3137,6 +3350,27 @@ ImplFontEntry* ImplFontCache::GetFallbac
          pFallbackFont->maMetric.maStyleName = String();
      }
  
@@ -523,7 +693,7 @@
      return pFallbackFont;
  }
  
-@@ -6105,7 +6325,7 @@ SalLayout* OutputDevice::ImplLayout( con
+@@ -6103,7 +6337,7 @@ SalLayout* OutputDevice::ImplLayout( con
      // do glyph fallback if needed
      // #105768# avoid fallback for very small font sizes
      if( aLayoutArgs.NeedFallback() )
@@ -532,7 +702,7 @@
              pSalLayout = ImplGlyphFallbackLayout( pSalLayout, aLayoutArgs );
  
      // position, justify, etc. the layout
-@@ -6149,6 +6369,17 @@ SalLayout* OutputDevice::ImplGlyphFallba
+@@ -6147,6 +6381,17 @@ SalLayout* OutputDevice::ImplGlyphFallba
          rLayoutArgs.ResetPos();
      }
  #endif
@@ -550,7 +720,7 @@
  
      ImplFontSelectData aFontSelData = mpFontEntry->maFontSelData;
      Size aFontSize( aFontSelData.mnWidth, aFontSelData.mnHeight );
-@@ -6165,7 +6396,8 @@ SalLayout* OutputDevice::ImplGlyphFallba
+@@ -6163,7 +6408,8 @@ SalLayout* OutputDevice::ImplGlyphFallba
      {
          // find a font family suited for glyph fallback
          ImplFontEntry* pFallbackFont = mpFontCache->GetFallback( mpFontList,
@@ -560,23 +730,23 @@
          if( !pFallbackFont )
              break;
  
-@@ -6217,6 +6449,8 @@ SalLayout* OutputDevice::ImplGlyphFallba
+@@ -6214,6 +6460,8 @@ SalLayout* OutputDevice::ImplGlyphFallba
+         if( !rLayoutArgs.PrepareFallback() )
              break;
      }
- 
-+    delete pMissingUnicodes;
 +
++    delete pMissingUnicodes;
+ 
      if( pMultiSalLayout && pMultiSalLayout->LayoutText( rLayoutArgs ) )
          pSalLayout = pMultiSalLayout;
-     
 Index: util/makefile.mk
 ===================================================================
 RCS file: /cvs/gsl/vcl/util/makefile.mk,v
-retrieving revision 1.69
-diff -u -p -r1.69 makefile.mk
---- openoffice.org.orig/vcl/util/makefile.mk	17 Jun 2005 09:29:14 -0000	1.69
-+++ openoffice.org/vcl/util/makefile.mk	8 Jul 2005 16:27:18 -0000
-@@ -261,7 +261,7 @@ SHL1STDLIBS += -framework Cocoa
+retrieving revision 1.71
+diff -u -p -u -r1.71 makefile.mk
+--- openoffice.org.orig/vcl/util/makefile.mk	18 Jul 2005 14:10:12 -0000	1.71
++++ openoffice.org/vcl/util/makefile.mk	2 Aug 2005 12:26:55 -0000
+@@ -265,7 +265,7 @@ SHL1STDLIBS += -framework Cocoa
  .ENDIF
  
  
@@ -585,128 +755,3 @@
  
  .ENDIF          # "$(GUI)"=="UNX"
  
-Index: inc/psprint/fontmanager.hxx
-===================================================================
-RCS file: /cvs/gsl/psprint/inc/psprint/fontmanager.hxx,v
-retrieving revision 1.22
-diff -u -p -r1.22 fontmanager.hxx
---- openoffice.org.orig/psprint/inc/psprint/fontmanager.hxx	31 Jan 2005 08:58:54 -0000	1.22
-+++ openoffice.org/psprint/inc/psprint/fontmanager.hxx	8 Jul 2005 16:05:06 -0000
-@@ -79,7 +79,7 @@
- #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
- #include <com/sun/star/lang/Locale.hpp>
- #endif
--
-+#include <fontconfig/fontconfig.h>
- #define ATOM_FAMILYNAME                     2
- #define ATOM_PSNAME                         3
- 
-@@ -415,6 +442,7 @@ class PrintFontManager
-     std::hash_multimap< sal_uInt8, sal_Unicode >	m_aAdobecodeToUnicode;
- 
-     mutable FontCache*							m_pFontCache;
-+    FcConfig *mpFontConfig;
-         
-     rtl::OString getAfmFile( PrintFont* pFont ) const;
-     rtl::OString getFontFile( PrintFont* pFont ) const;
-@@ -468,6 +496,7 @@ class PrintFontManager
-     ~PrintFontManager();
- public:
-     static PrintFontManager& get(); // one instance only
-+    FcConfig *getFontconfig() { return mpFontConfig; }
- 
-     int addFontFile( const rtl::OString& rFileName, int nFaceNum ); 
- 
-Index: source/fontmanager/fontcache.cxx
-===================================================================
-RCS file: /cvs/gsl/psprint/source/fontmanager/fontcache.cxx,v
-retrieving revision 1.13
-diff -u -p -r1.13 fontcache.cxx
---- openoffice.org.orig/psprint/source/fontmanager/fontcache.cxx	6 Jun 2005 16:07:21 -0000	1.13
-+++ openoffice.org/psprint/source/fontmanager/fontcache.cxx	8 Jul 2005 16:05:07 -0000
-@@ -703,9 +703,9 @@ bool FontCache::getFontCacheFile( int nD
-         FontDirMap::const_iterator entry = dir->second.m_aEntries.find( rFile );
-         if( entry != dir->second.m_aEntries.end() )
-         {
--            bSuccess = true;
-             for( FontCacheEntry::const_iterator font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font )
-             {
-+                bSuccess = true;
-                 PrintFontManager::PrintFont* pFont = clonePrintFont( *font );
-                 rNewFonts.push_back( pFont );
-             }
-Index: source/fontmanager/fontconfig.cxx
-===================================================================
-RCS file: /cvs/gsl/psprint/source/fontmanager/fontconfig.cxx,v
-retrieving revision 1.7
-diff -u -p -r1.7 fontconfig.cxx
---- openoffice.org.orig/psprint/source/fontmanager/fontconfig.cxx	13 Oct 2004 08:22:03 -0000	1.7
-+++ openoffice.org/psprint/source/fontmanager/fontconfig.cxx	8 Jul 2005 16:05:07 -0000
-@@ -113,6 +113,8 @@ class FontCfgWrapper
-     FcPattern*		(*m_pFcPatternCreate)();
-     void			(*m_pFcPatternDestroy)(FcPattern*);
-     FcFontSet*		(*m_pFcFontList)(FcConfig*,FcPattern*,FcObjectSet*);
-+    FcBool		(*m_pFcConfigAppFontAddFile)(FcConfig*,const char *);
-+    FcConfig*		(*m_pFcConfigCreate)(void);
-     FcFontSet*		(*m_pFcFontSetCreate)();
-     void			(*m_pFcFontSetDestroy)(FcFontSet*);
-     FcBool			(*m_pFcFontSetAdd)(FcFontSet*,FcPattern*);
-@@ -164,6 +166,12 @@ public:
-     
-     FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet )
-     { return m_pFcFontList( pConfig, pPattern, pSet ); }
-+
-+    FcBool FcConfigAppFontAddFile( FcConfig* pConfig, const char *file )
-+    { return m_pFcConfigAppFontAddFile( pConfig, file); }
-+
-+    FcConfig* FcConfigCreate( void )
-+    { return m_pFcConfigCreate(); }
-     
-     FcFontSet* FcFontSetCreate()
-     { return m_pFcFontSetCreate(); }
-@@ -239,6 +247,10 @@ FontCfgWrapper::FontCfgWrapper()
-         loadSymbol( "FcPatternDestroy" );
-     m_pFcFontList = (FcFontSet*(*)(FcConfig*,FcPattern*,FcObjectSet*))
-         loadSymbol( "FcFontList" );
-+    m_pFcConfigAppFontAddFile = (FcBool(*)(FcConfig*,const char*))
-+        loadSymbol( "FcConfigAppFontAddFile" );
-+    m_pFcConfigCreate = (FcConfig*(*)())
-+        loadSymbol( "FcConfigCreate" );
-     m_pFcFontSetCreate = (FcFontSet*(*)())
-         loadSymbol( "FcFontSetCreate" );
-     m_pFcFontSetDestroy = (void(*)(FcFontSet*))
-@@ -271,6 +283,8 @@ FontCfgWrapper::FontCfgWrapper()
-             m_pFcPatternCreate				&&
-             m_pFcPatternDestroy				&&
-             m_pFcFontList					&&
-+            m_pFcConfigAppFontAddFile		&&
-+            m_pFcConfigCreate				&&
-             m_pFcFontSetCreate				&&
-             m_pFcFontSetDestroy				&&
-             m_pFcFontSetAdd					&&
-@@ -330,12 +344,15 @@ void FontCfgWrapper::release()
- bool PrintFontManager::initFontconfig()
- {
-     int nFonts = 0;
-+    mpFontConfig = 0;
- 
- #ifdef ENABLE_FONTCONFIG    
-     FontCfgWrapper& rWrapper = FontCfgWrapper::get();
-     if( ! rWrapper.isValid() )
-         return false;
- 
-+    mpFontConfig = rWrapper.FcConfigCreate();
-+
-     FcConfig* pConfig = rWrapper.getDefConfig();
-     FcObjectSet* pOSet = rWrapper.FcObjectSetBuild( FC_FAMILY,
-                                                     FC_STYLE,
-@@ -394,6 +411,9 @@ bool PrintFontManager::initFontconfig()
-             if( eOutRes == FcResultMatch && ! outline )
-                 continue;
- 
-+	    /*cmc add only acceptable fonts to our config, for future fontconfig use*/
-+            rWrapper.FcConfigAppFontAddFile(mpFontConfig, (const char*)file);
-+
-             // see if this font is already cached
-             // update attributes
-             std::list< PrintFont* > aFonts;


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.364
retrieving revision 1.365
diff -u -r1.364 -r1.365
--- openoffice.org.spec	2 Aug 2005 07:35:33 -0000	1.364
+++ openoffice.org.spec	2 Aug 2005 12:32:05 -0000	1.365
@@ -1,5 +1,5 @@
 %define ooo2ver 121
-%define ooo_rpm_release 4
+%define ooo_rpm_release 5
 %define build_fc4 0
 %define build_fc5 1
 
@@ -3073,6 +3073,9 @@
 %{instdir}/share/registry/modules/org/openoffice/Office/Scripting/Scripting-python.xcu
 
 %changelog
+* Tue Aug 02 2005 Caolan McNamara <caolanm at redhat.com> - 1:1.9.121-5
+- smoketest build
+
 * Tue Aug 02 2005 Caolan McNamara <caolanm at redhat.com> - 1:1.9.121-4
 - return of ppc
 




More information about the fedora-cvs-commits mailing list