1
diff -ru vcl.preconfig/inc/outdev.h vcl/inc/outdev.h
2
--- openoffice.org.orig/vcl/inc/outdev.h 2005-09-12 13:37:38.000000000 +0100
3
+++ vcl/inc/outdev.h 2005-09-12 14:10:15.000000000 +0100
5
const Font& rFont, const Size& rSize, ImplFontSubstEntry* pDevSpecific );
6
ImplFontEntry* GetFallback( ImplDevFontList* pFontList,
7
const Font& rFont, const Size& rSize,
8
- int nFallbackLevel );
9
+ int nFallbackLevel, sal_Unicode *pMissingUnicodes,
10
+ int nMissingUnicodes );
11
void Release( ImplFontEntry* );
14
diff -ru vcl.preconfig/inc/outfont.hxx vcl/inc/outfont.hxx
15
--- openoffice.org.orig/vcl/inc/outfont.hxx 2005-09-12 13:37:38.000000000 +0100
16
+++ vcl/inc/outfont.hxx 2005-09-12 14:48:01.000000000 +0100
18
ImplDevFontListData* FindFontFamily( const String& rFontName ) const;
19
ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplFontSubstEntry* pDevSpecificSubst ) const;
20
ImplDevFontListData* ImplFindBySearchName( const String& ) const;
21
+ ImplDevFontListData* ImplGetFontconfigSubstitute( ImplFontSelectData &rFontSelData, ImplFontSubstEntry* pDevSpecific );
23
bool HasFallbacks() const;
24
void SetFallbacks( ImplDevFontListData**, int nCount );
26
ImplFontEntry( const ImplFontSelectData& );
27
virtual ~ImplFontEntry() {}
29
+ // cache of Unicode characters and replacement font names
30
+ typedef ::std::hash_map<sal_Unicode,String> UnicodeFallbackList;
31
+ UnicodeFallbackList maUnicodeFallbackList;
33
public: // TODO: make data members private
34
ImplFontSelectData maFontSelData; // FontSelectionData
35
ImplFontMetricData maMetric; // Font Metric
37
short mnOwnOrientation; // text angle if lower layers don't rotate text themselves
38
short mnOrientation; // text angle in 3600 system
39
bool mbInit; // true if maMetric member is valid
41
+ void AddFallbackForUnicode( sal_Unicode ch, String fallback )
42
+ { maUnicodeFallbackList[ch] = fallback; }
43
+ String GetFallbackForUnicode( sal_Unicode ch )
45
+ UnicodeFallbackList::const_iterator it = maUnicodeFallbackList.find( ch );
46
+ if ( it != maUnicodeFallbackList.end() )
47
+ return (*it).second;
53
diff -ru vcl.preconfig/source/gdi/outdev3.cxx vcl/source/gdi/outdev3.cxx
54
--- openoffice.org.orig/vcl/source/gdi/outdev3.cxx 2005-09-12 13:37:04.000000000 +0100
55
+++ vcl/source/gdi/outdev3.cxx 2005-09-12 15:26:08.000000000 +0100
60
+#include <psprint/fontmanager.hxx>
61
+#include <tools/isolang.hxx>
63
// =======================================================================
65
DBG_NAMEEX( OutputDevice );
66
@@ -2656,6 +2659,124 @@ ImplFontCache::~ImplFontCache()
71
+// -----------------------------------------------------------------------
73
+String GetFcSubstitute(const ImplFontSelectData &rFontSelData, sal_Unicode *pMissingGlyphs=0, int nMissingGlyphs=0)
75
+ std::vector<String> aNames;
76
+ if( rFontSelData.GetFamilyName().Len() )
78
+ sal_uInt16 nIndex = 0;
82
+ aTempName = GetNextFontToken(rFontSelData.GetFamilyName(), nIndex);
83
+ aNames.push_back(aTempName);
85
+ while (nIndex != STRING_NOTFOUND);
88
+ std::vector<sal_Unicode> aGlyphs;
89
+ for (int i=0; i < nMissingGlyphs; ++i)
90
+ aGlyphs.push_back(pMissingGlyphs[i]);
92
+ ByteString aLangAttrib = ConvertLanguageToIsoByteString( rFontSelData.meLanguage );
94
+ psp::italic::type eItalic = psp::italic::Unknown;
95
+ if( rFontSelData.GetSlant() != ITALIC_DONTKNOW )
97
+ switch( rFontSelData.GetSlant() )
99
+ case ITALIC_NORMAL: eItalic = psp::italic::Italic; break;
100
+ case ITALIC_OBLIQUE: eItalic = psp::italic::Oblique; break;
106
+ psp::weight::type eWeight = psp::weight::Unknown;
107
+ if( rFontSelData.GetWeight() != WEIGHT_DONTKNOW )
109
+ switch( rFontSelData.GetWeight() )
111
+ case WEIGHT_THIN: eWeight = psp::weight::Thin; break;
112
+ case WEIGHT_ULTRALIGHT: eWeight = psp::weight::UltraLight; break;
113
+ case WEIGHT_LIGHT: eWeight = psp::weight::Light; break;
114
+ case WEIGHT_SEMILIGHT: eWeight = psp::weight::SemiLight; break;
115
+ case WEIGHT_NORMAL: eWeight = psp::weight::Normal; break;
116
+ case WEIGHT_MEDIUM: eWeight = psp::weight::Medium; break;
117
+ case WEIGHT_SEMIBOLD: eWeight = psp::weight::SemiBold; break;
118
+ case WEIGHT_BOLD: eWeight = psp::weight::Bold; break;
119
+ case WEIGHT_ULTRABOLD: eWeight = psp::weight::UltraBold; break;
120
+ case WEIGHT_BLACK: eWeight = psp::weight::Black; break;
126
+ psp::width::type eWidth = psp::width::Unknown;
127
+ if( rFontSelData.GetWidthType() != WIDTH_DONTKNOW )
129
+ switch( rFontSelData.GetWidthType() )
131
+ case WIDTH_ULTRA_CONDENSED: eWidth = psp::width::UltraCondensed; break;
132
+ case WIDTH_EXTRA_CONDENSED: eWidth = psp::width::ExtraCondensed; break;
133
+ case WIDTH_CONDENSED: eWidth = psp::width::Condensed; break;
134
+ case WIDTH_SEMI_CONDENSED: eWidth = psp::width::SemiCondensed; break;
135
+ case WIDTH_NORMAL: eWidth = psp::width::Normal; break;
136
+ case WIDTH_SEMI_EXPANDED: eWidth = psp::width::SemiExpanded; break;
137
+ case WIDTH_EXPANDED: eWidth = psp::width::Expanded; break;
138
+ case WIDTH_EXTRA_EXPANDED: eWidth = psp::width::ExtraExpanded; break;
139
+ case WIDTH_ULTRA_EXPANDED: eWidth = psp::width::UltraExpanded; break;
145
+ psp::pitch::type ePitch = psp::pitch::Unknown;
146
+ if( rFontSelData.GetPitch() != PITCH_DONTKNOW )
148
+ switch( rFontSelData.GetPitch() )
150
+ case PITCH_FIXED: ePitch=psp::pitch::Fixed; break;
151
+ case PITCH_VARIABLE: ePitch=psp::pitch::Variable; break;
157
+ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
158
+ return rMgr.Substitute(aNames, aGlyphs, aLangAttrib, eItalic, eWeight, eWidth, ePitch);
161
+// -----------------------------------------------------------------------
163
+ImplDevFontListData *ImplDevFontList::ImplGetFontconfigSubstitute( ImplFontSelectData &rFontSelData, ImplFontSubstEntry* pDevSpecific )
165
+ // We dont' actually want to talk to Fontconfig at all for symbol fonts
166
+ if (rFontSelData.IsSymbolFont())
168
+ // StarSymbol is a unicode font, but it still deserves the symbol flag
169
+ if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10)
170
+ || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) )
173
+ String aName(GetFcSubstitute(rFontSelData));
177
+ String aUserName(aName);
178
+ ImplGetEnglishSearchFontName( aName );
179
+ ImplFontSubstitute( aName, FONT_SUBSTITUTE_ALWAYS, pDevSpecific );
180
+ ImplDevFontListData *pFontFamily = ImplFindBySearchName( aName );
182
+ rFontSelData.maTargetName = aUserName;
184
+ return pFontFamily;
188
// -----------------------------------------------------------------------
190
ImplFontEntry* ImplFontCache::Get( ImplDevFontList* pFontList,
191
@@ -2693,8 +2814,12 @@ ImplFontEntry* ImplFontCache::Get( ImplD
193
if( !pEntry ) // no direct cache hit
195
- // find the best matching logical font family and update font selector accordingly
196
- pFontFamily = pFontList->ImplFindByFont( aFontSelData, mbPrinter, pDevSpecific );
197
+ pFontFamily = pFontList->ImplGetFontconfigSubstitute( aFontSelData, pDevSpecific );
200
+ // find the best matching logical font family and update font selector accordingly
201
+ pFontFamily = pFontList->ImplFindByFont( aFontSelData, mbPrinter, pDevSpecific );
203
DBG_ASSERT( (pFontFamily != NULL), "ImplFontCache::Get() No logical font found!" );
204
aFontSelData.maSearchName = pFontFamily->GetSearchName();
206
@@ -3014,116 +3139,101 @@ ImplDevFontListData* ImplDevFontList::Im
207
// -----------------------------------------------------------------------
209
ImplFontEntry* ImplFontCache::GetFallback( ImplDevFontList* pFontList,
210
- const Font& rOrigFont, const Size& rSize, int nFallbackLevel )
211
+ const Font& rOrigFont, const Size& rSize, int nFallbackLevel,
212
+ sal_Unicode *pMissingUnicodes, int nMissingUnicodes )
214
- // make sure the fontlist knows it's fallbacks
215
- if( !pFontList->HasFallbacks() )
216
+ ImplFontEntry* pFallbackFont = NULL;
217
+ bool cached = false;
218
+ bool new_entry = false;
219
+ bool symbolFont = false;
220
+ ImplFontEntry* pOrigFontEntry = Get( pFontList, rOrigFont, rSize, NULL );
221
+ ImplFontSelectData aSelData( rOrigFont, rOrigFont.GetName(), rSize );
222
+ sal_uInt16 nToken = 0;
223
+ String aOrigFontName( GetNextFontToken(rOrigFont.GetName(), nToken) );
225
+ const FontSubstConfigItem& rFontSubst = *FontSubstConfigItem::get();
226
+ const FontNameAttr* fontAttr = rFontSubst.getSubstInfo( aOrigFontName );
228
+ // We dont' actually want to talk to Fontconfig at all for symbol fonts
229
+ if ( pFontList && fontAttr && (fontAttr->Type & IMPL_FONT_ATTR_SYMBOL) )
231
- // normalized family names of fonts suited for glyph fallback
232
- // if a font is available related fonts can be ignored
233
- // TODO: implement dynamic lists
234
- static const char* aGlyphFallbackList[] = {
235
- // empty strings separate the names of unrelated fonts
237
- "arialunicodems", "cyberbit", "code2000", "",
238
- "andalesansui", "",
239
- "starsymbol", "opensymbol", "",
240
- "msmincho", "fzmingti", "fzheiti", "ipamincho", "sazanamimincho", "kochimincho", "",
241
- "sunbatang", "sundotum", "baekmukdotum", "gulim", "batang", "dotum", "",
242
- "hgmincholightj", "msunglightsc", "msunglighttc", "hymyeongjolightk", "",
243
- "tahoma", "timesnewroman", "lucidatypewriter", "lucidasans", "nimbussansl", "",
244
- "shree", "mangal", "raavi", "shruti", "tunga", "latha", "",
245
- "shayyalmt", "naskmt", "",
246
- "david", "nachlieli", "lucidagrande", "",
247
- "norasi", "angsanaupc", "",
248
- "khmerossystem", "",
249
- "phetsarathot", "",
253
- bool bHasEudc = false;
255
- int nBestQuality = 0;
256
- ImplDevFontListData** pFallbackList = NULL;
257
- for( const char** ppNames = &aGlyphFallbackList[0];; ++ppNames )
258
+ if ( fontAttr->Substitutions.size() )
260
- // advance to next sub-list when end-of-sublist marker
261
- if( !**ppNames ) // #i46456# check for empty string, i.e., deref string itself not only ptr to it
262
+ ::std::vector< String >::const_iterator it = fontAttr->Substitutions.begin();
263
+ while ( it != fontAttr->Substitutions.end() )
265
- if( nBestQuality > 0 )
266
- if( ++nMaxLevel >= MAX_FALLBACK )
269
+ // Since *it is the "search name" like "standardsymbolsl"
270
+ // we have to find the Family Name (Standard Symbols L) for Fontconfig
271
+ ImplDevFontListData* pFontFamily = pFontList->FindFontFamily( *it );
274
+ aSelData.maSearchName = pFontFamily->GetFamilyName();
286
- // test if the glyph fallback candidate font is available and scalable
287
- String aTokenName( *ppNames, RTL_TEXTENCODING_UTF8 );
288
- ImplDevFontListData* pFallbackFont = pFontList->FindFontFamily( aTokenName );
289
- if( !pFallbackFont )
291
- if( !pFallbackFont->IsScalable() )
293
+ // Try cached fallbacks first
294
+ if ( !symbolFont && (nMissingUnicodes > 0) )
296
+ aSelData.maSearchName = pOrigFontEntry->GetFallbackForUnicode( pMissingUnicodes[0] );
297
+ if ( aSelData.maSearchName.Len() )
301
- // keep the best font of the glyph fallback sub-list
302
- if( nBestQuality < pFallbackFont->GetMinQuality() )
304
- nBestQuality = pFallbackFont->GetMinQuality();
305
- // store available glyph fallback fonts
306
- if( !pFallbackList )
307
- pFallbackList = new ImplDevFontListData*[ MAX_FALLBACK ];
308
- pFallbackList[ nMaxLevel ] = pFallbackFont;
309
- if( !bHasEudc && !nMaxLevel )
310
- bHasEudc = (0 == strncmp( *ppNames, "eudc", 5 ));
315
+ String aName(GetFcSubstitute( aSelData, pMissingUnicodes, nMissingUnicodes ));
317
+ aSelData.maSearchName = aName;
320
- // sort the list of fonts for glyph fallback by quality (highest first)
321
- // #i33947# keep the EUDC font at the front of the list
322
- // an insertion sort is good enough for this short list
323
- const int nSortStart = bHasEudc ? 1 : 0;
324
- for( int i = nSortStart+1, j; i < nMaxLevel; ++i )
326
- ImplDevFontListData* pTestFont = pFallbackList[ i ];
327
- int nTestQuality = pTestFont->GetMinQuality();
328
- for( j = i; --j >= nSortStart; )
329
- if( nTestQuality > pFallbackList[j]->GetMinQuality() )
330
- pFallbackList[ j+1 ] = pFallbackList[ j ];
333
- pFallbackList[ j+1 ] = pTestFont;
335
+ // Check our font instance cache first, if not found then
336
+ // add this ImplFontSelectData to the cache along with its ImplFontEntry
337
+ FontInstanceList::const_iterator it = maFontInstanceList.find( aSelData );
338
+ if (it != maFontInstanceList.end())
339
+ pFallbackFont = (*it).second;
342
+ // find the best matching physical font face
343
+ ImplDevFontListData* pFontFamily = pFontList->FindFontFamily( aSelData.maSearchName );
346
+ ImplFontData* pFontData = pFontFamily->FindBestFontFace( aSelData );
348
-#if defined(HDU_DEBUG)
349
- for( int i = 0; i < nMaxLevel; ++i )
350
+ // create a new logical font instance from this physical font face
351
+ aSelData.mpFontData = pFontData;
352
+ pFallbackFont = pFontData->CreateFontInstance( aSelData );
354
+ // if we found a different symbol font we need a symbol conversion table
355
+ if( pFontData->IsSymbolFont() )
356
+ if( aSelData.maTargetName != aSelData.maSearchName )
357
+ pFallbackFont->mpConversion = ImplGetRecodeData( aSelData.maTargetName, aSelData.maSearchName );
358
+ // add the new entry to the cache
359
+ maFontInstanceList[ aSelData ] = pFallbackFont;
364
- ImplDevFontListData* pFont = pFallbackList[ i ];
365
- ByteString aFontName( pFont->GetFamilyName(), RTL_TEXTENCODING_UTF8 );
366
- fprintf( stderr, "GlyphFallbackFont[%d] (quality=%05d): \"%s\"\n",
367
- i, pFont->GetMinQuality(), aFontName.GetBuffer() );
368
+ ByteString l( aSelData.maSearchName, RTL_TEXTENCODING_UTF8 );
369
+ //fprintf (stderr, "--- Couldn't get FontFamily for '%s'\n", l.GetBuffer());
373
- pFontList->SetFallbacks( pFallbackList, nMaxLevel );
376
- Font aFallbackFont = rOrigFont;
378
- // nFallbackLevel==0 => original font without device specific substitution
379
- // nFallbackLevel>=1 => use a font from the glyph fallback font list
380
- if( nFallbackLevel>=1 )
381
+ // Cache the fallback font for each of the missing Unicode chars
382
+ if ( !symbolFont && aSelData.maSearchName.Len() )
384
- ImplDevFontListData* pFallbackData = pFontList->GetFallback( nFallbackLevel-1 );
385
- if( !pFallbackData )
388
- aFallbackFont.SetName( pFallbackData->GetSearchName() );
389
+ for ( int i = 0; i < nMissingUnicodes; i++ )
391
+ if ( ! pOrigFontEntry->GetFallbackForUnicode(pMissingUnicodes[i]).Len() )
392
+ pOrigFontEntry->AddFallbackForUnicode( pMissingUnicodes[i], aSelData.maSearchName );
396
- ImplFontEntry* pFallbackFont = Get( pFontList, aFallbackFont, rSize, NULL );
398
if( pFallbackFont && !pFallbackFont->mbInit )
400
// HACK: maMetrics are irrelevant for fallback fonts, but
401
@@ -3131,6 +3242,27 @@ ImplFontEntry* ImplFontCache::GetFallbac
402
pFallbackFont->maMetric.maStyleName = String();
405
+ if ( pFallbackFont && !new_entry )
407
+ // increase the font instance's reference count
408
+ if( !pFallbackFont->mnRefCount++ )
413
+ sal_uInt16 nTok = 0;
414
+ ByteString n( GetNextFontToken(rOrigFont.GetName(), nTok), RTL_TEXTENCODING_UTF8);
419
+ ByteString tS( GetNextFontToken(pFallbackFont->maFontSelData.mpFontData->GetFamilyName(), nTok), RTL_TEXTENCODING_UTF8 );
422
+ fprintf (stderr, "Glyph fallback '%s'->'%s' %s\n", n.GetBuffer(), pFallbackFont ? m.GetBuffer() : "none",
423
+ new_entry ? "(new)" : "(cached)");
426
return pFallbackFont;
429
@@ -6097,7 +6229,7 @@ SalLayout* OutputDevice::ImplLayout( con
430
// do glyph fallback if needed
431
// #105768# avoid fallback for very small font sizes
432
if( aLayoutArgs.NeedFallback() )
433
- if( mpFontEntry && (mpFontEntry->maFontSelData.mnHeight >= 6) )
434
+ if( mpFontEntry && (mpFontEntry->maFontSelData.mnHeight >= 3) )
435
pSalLayout = ImplGlyphFallbackLayout( pSalLayout, aLayoutArgs );
437
// position, justify, etc. the layout
438
@@ -6141,6 +6273,17 @@ SalLayout* OutputDevice::ImplGlyphFallba
439
rLayoutArgs.ResetPos();
444
+ sal_Unicode *pMissingUnicodes = new sal_Unicode[8];
445
+ int nMissingUnicodes = 0;
447
+ for( int i=0; i<8 && rLayoutArgs.GetNextPos( &nCharPos, &bRTL); ++i )
449
+ pMissingUnicodes[i] = rLayoutArgs.mpStr[ nCharPos ];
450
+ nMissingUnicodes++;
452
+ rLayoutArgs.ResetPos();
454
ImplFontSelectData aFontSelData = mpFontEntry->maFontSelData;
455
Size aFontSize( aFontSelData.mnWidth, aFontSelData.mnHeight );
456
@@ -6157,7 +6300,8 @@ SalLayout* OutputDevice::ImplGlyphFallba
458
// find a font family suited for glyph fallback
459
ImplFontEntry* pFallbackFont = mpFontCache->GetFallback( mpFontList,
460
- maFont, aFontSize, nFallbackLevel-nDevSpecificFallback );
461
+ maFont, aFontSize, nFallbackLevel-nDevSpecificFallback,
462
+ (nMissingUnicodes ? pMissingUnicodes : NULL), nMissingUnicodes );
466
@@ -6208,6 +6352,8 @@ SalLayout* OutputDevice::ImplGlyphFallba
467
if( !rLayoutArgs.PrepareFallback() )
471
+ delete[] pMissingUnicodes;
473
if( pMultiSalLayout && pMultiSalLayout->LayoutText( rLayoutArgs ) )
474
pSalLayout = pMultiSalLayout;
475
diff -ru vcl.preconfig/source/window/window.cxx vcl/source/window/window.cxx
476
--- openoffice.org.orig/vcl/source/window/window.cxx 2005-09-12 13:37:04.000000000 +0100
477
+++ vcl/source/window/window.cxx 2005-09-12 16:18:20.000000000 +0100
481
#include <pdfextoutdevdata.hxx>
482
+#include <psprint/fontmanager.hxx>
485
using namespace ::com::sun::star::uno;
490
+ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
491
+ if (rMgr.hasFontconfig())
495
aTestText.Append( Button::GetStandardText( BUTTON_OK ) );
496
aTestText.Append( Button::GetStandardText( BUTTON_CANCEL ) );
497
diff -ru vcl.preconfig/util/makefile.mk vcl/util/makefile.mk
498
--- openoffice.org.orig/vcl/util/makefile.mk 2005-09-12 13:37:38.000000000 +0100
499
+++ vcl/util/makefile.mk 2005-09-12 14:55:10.000000000 +0100
504
-SHL1STDLIBS += -lX11
505
+SHL1STDLIBS += -lX11 -lpsp$(VERSION)$(DLLPOSTFIX)
507
.ENDIF # "$(GUI)"=="UNX"
509
Index: inc/psprint/fontmanager.hxx
510
===================================================================
511
RCS file: /cvs/gsl/psprint/inc/psprint/fontmanager.hxx,v
512
retrieving revision 1.24
513
diff -u -r1.24 fontmanager.hxx
514
--- openoffice.org.orig/psprint/uinc/psprint/fontmanager.hxx 5 Aug 2005 13:21:02 -0000 1.24
515
+++ psprint/inc/psprint/fontmanager.hxx 12 Sep 2005 16:21:13 -0000
517
#ifndef _PSPRINT_HELPER_HXX_
518
#include <psprint/helper.hxx>
521
+#include <tools/string.hxx>
524
#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
525
#include <com/sun/star/lang/Locale.hpp>
527
std::hash_multimap< sal_uInt8, sal_Unicode > m_aAdobecodeToUnicode;
529
mutable FontCache* m_pFontCache;
530
+ bool m_bFontconfigSuccess;
532
rtl::OString getAfmFile( PrintFont* pFont ) const;
533
rtl::OString getFontFile( PrintFont* pFont ) const;
537
bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale );
539
+ String Substitute(const std::vector<String> &rNames, const std::vector<sal_Unicode> &rGlyphs,
540
+ const ByteString &rLangAttrib, italic::type eItalic, weight::type eWeight,
541
+ width::type eWidth, pitch::type ePitch) const;
542
+ bool hasFontconfig() const { return m_bFontconfigSuccess; }
546
Index: source/fontmanager/fontcache.cxx
547
===================================================================
548
RCS file: /cvs/gsl/psprint/source/fontmanager/fontcache.cxx,v
549
retrieving revision 1.14
550
diff -u -r1.14 fontcache.cxx
551
--- openoffice.org.orig/psprint/usource/fontmanager/fontcache.cxx 9 Aug 2005 10:59:38 -0000 1.14
552
+++ psprint/source/fontmanager/fontcache.cxx 12 Sep 2005 16:21:13 -0000
554
FontDirMap::const_iterator entry = dir->second.m_aEntries.find( rFile );
555
if( entry != dir->second.m_aEntries.end() )
558
for( FontCacheEntry::const_iterator font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font )
561
PrintFontManager::PrintFont* pFont = clonePrintFont( *font );
562
rNewFonts.push_back( pFont );
564
Index: source/fontmanager/fontmanager.cxx
565
===================================================================
566
RCS file: /cvs/gsl/psprint/source/fontmanager/fontmanager.cxx,v
567
retrieving revision 1.59
568
diff -u -r1.59 fontmanager.cxx
569
--- openoffice.org.orig/psprint/usource/fontmanager/fontmanager.cxx 5 Aug 2005 12:53:31 -0000 1.59
570
+++ psprint/source/fontmanager/fontmanager.cxx 12 Sep 2005 16:21:14 -0000
571
@@ -1155,7 +1155,8 @@ PrintFontManager::PrintFontManager() :
573
m_pAtoms( new MultiAtomProvider() ),
575
- m_pFontCache( NULL )
576
+ m_pFontCache( NULL ),
577
+ m_bFontconfigSuccess(false)
579
for( unsigned int i = 0; i < sizeof( aAdobeCodes )/sizeof( aAdobeCodes[0] ); i++ )
581
@@ -2109,7 +2110,7 @@ void PrintFontManager::initialize( void*
584
// first try fontconfig
585
- bool bFontconfigSuccess = initFontconfig();
586
+ m_bFontconfigSuccess = initFontconfig();
588
// part one - look for downloadable fonts
589
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
590
@@ -2131,7 +2132,7 @@ void PrintFontManager::initialize( void*
593
// don't search through many directories fontconfig already told us about
594
- if( ! bFontconfigSuccess )
595
+ if( ! m_bFontconfigSuccess )
597
Display *pDisplay = (Display*)pInitDisplay;
599
@@ -2209,7 +2210,7 @@ void PrintFontManager::initialize( void*
603
- } // ! bFontconfigSuccess
604
+ } // ! m_bFontconfigSuccess
606
// fill XLFD aliases from fonts.alias files
608
Index: source/fontmanager/fontconfig.cxx
609
===================================================================
610
RCS file: /cvs/gsl/psprint/source/fontmanager/fontconfig.cxx,v
611
retrieving revision 1.14
612
diff -u -p -u -r1.14 fontconfig.cxx
613
--- openoffice.org.orig/psprint/source/fontmanager/fontconfig.cxx 27 Oct 2005 07:55:13 -0000 1.14
614
+++ psprint/source/fontmanager/fontconfig.cxx 5 Nov 2005 11:22:58 -0000
615
@@ -44,10 +44,12 @@ typedef void FcConfig;
616
typedef void FcObjectSet;
617
typedef void FcPattern;
618
typedef void FcFontSet;
619
+typedef void FcCharSet;
620
typedef int FcResult;
622
typedef int FcMatchKind;
623
typedef char FcChar8;
624
+typedef sal_Int32 FcChar32;
628
@@ -80,6 +82,7 @@ class FontCfgWrapper
631
FcConfig* m_pDefConfig;
632
+ FcFontSet* m_pOutlineSet;
634
FcBool (*m_pFcInit)();
635
FcConfig* (*m_pFcConfigGetCurrent)();
636
@@ -88,17 +91,23 @@ class FontCfgWrapper
637
FcPattern* (*m_pFcPatternCreate)();
638
void (*m_pFcPatternDestroy)(FcPattern*);
639
FcFontSet* (*m_pFcFontList)(FcConfig*,FcPattern*,FcObjectSet*);
640
+ FcFontSet* (*m_pFcConfigGetFonts)(FcConfig*,FcSetName);
641
FcFontSet* (*m_pFcFontSetCreate)();
642
+ FcCharSet* (*m_pFcCharSetCreate)();
643
+ FcBool (*m_pFcCharSetAddChar)(FcCharSet *, FcChar32);
644
void (*m_pFcFontSetDestroy)(FcFontSet*);
645
FcBool (*m_pFcFontSetAdd)(FcFontSet*,FcPattern*);
646
+ void (*m_pFcPatternReference)(FcPattern*);
647
FcResult (*m_pFcPatternGetString)(const FcPattern*,const char*,int,FcChar8**);
648
FcResult (*m_pFcPatternGetInteger)(const FcPattern*,const char*,int,int*);
649
FcResult (*m_pFcPatternGetDouble)(const FcPattern*,const char*,int,double*);
650
FcResult (*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*);
651
void (*m_pFcDefaultSubstitute)(FcPattern *);
652
- FcPattern* (*m_pFcFontMatch)(FcConfig*,FcPattern*,FcResult*);
653
+ FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*);
654
FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind);
655
FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int);
656
+ FcBool (*m_pFcPatternAddBool)(FcPattern*,const char*,FcBool);
657
+ FcBool (*m_pFcPatternAddCharSet)(FcPattern*,const char*,const FcCharSet*);
658
FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*);
660
void* loadSymbol( const char* );
661
@@ -114,6 +123,7 @@ public:
662
{ return m_pLib != NULL;}
664
FcConfig* getDefConfig() { return m_pDefConfig; }
665
+ FcFontSet* getFontSet() { return m_pOutlineSet; }
668
{ return m_pFcInit(); }
669
@@ -143,14 +153,28 @@ public:
671
FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet )
672
{ return m_pFcFontList( pConfig, pPattern, pSet ); }
675
+ FcFontSet* FcConfigGetFonts( FcConfig* pConfig, FcSetName eSet)
676
+ { return m_pFcConfigGetFonts( pConfig, eSet ); }
678
FcFontSet* FcFontSetCreate()
679
{ return m_pFcFontSetCreate(); }
681
+ FcCharSet* FcCharSetCreate()
682
+ { return m_pFcCharSetCreate(); }
684
+ FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4)
685
+ { return m_pFcCharSetAddChar(fcs, ucs4); }
687
void FcFontSetDestroy( FcFontSet* pSet )
688
{ m_pFcFontSetDestroy( pSet );}
690
FcBool FcFontSetAdd( FcFontSet* pSet, FcPattern* pPattern )
691
{ return m_pFcFontSetAdd( pSet, pPattern ); }
693
+ void FcPatternReference( FcPattern* pPattern )
694
+ { m_pFcPatternReference( pPattern ); }
696
FcResult FcPatternGetString( const FcPattern* pPattern, const char* object, int n, FcChar8** s )
697
{ return m_pFcPatternGetString( pPattern, object, n, s ); }
699
@@ -164,12 +188,16 @@ public:
700
{ return m_pFcPatternGetBool( pPattern, object, n, s ); }
701
void FcDefaultSubstitute( FcPattern* pPattern )
702
{ m_pFcDefaultSubstitute( pPattern ); }
703
- FcPattern* FcFontMatch( FcConfig* pConfig, FcPattern* pPattern, FcResult* pResult )
704
- { return m_pFcFontMatch( pConfig, pPattern, pResult ); }
705
+ FcPattern* FcFontSetMatch(FcConfig* pConfig, FcFontSet** ppFontSet, int nset, FcPattern *pPattern, FcResult *pResult)
706
+ { return m_pFcFontSetMatch( pConfig, ppFontSet, nset, pPattern, pResult ); }
707
FcBool FcConfigSubstitute( FcConfig* pConfig, FcPattern* pPattern, FcMatchKind eKind )
708
{ return m_pFcConfigSubstitute( pConfig, pPattern, eKind ); }
709
FcBool FcPatternAddInteger( FcPattern* pPattern, const char* pObject, int nValue )
710
{ return m_pFcPatternAddInteger( pPattern, pObject, nValue ); }
711
+ FcBool FcPatternAddBool( FcPattern* pPattern, const char* pObject, FcBool b )
712
+ { return m_pFcPatternAddBool( pPattern, pObject, b ); }
713
+ FcBool FcPatternAddCharSet( FcPattern* pPattern, const char* pObject, const FcCharSet *c)
714
+ { return m_pFcPatternAddCharSet( pPattern, pObject, c ); }
715
FcBool FcPatternAddString( FcPattern* pPattern, const char* pObject, const FcChar8* pString )
716
{ return m_pFcPatternAddString( pPattern, pObject, pString ); }
718
@@ -186,7 +214,8 @@ void* FontCfgWrapper::loadSymbol( const
720
FontCfgWrapper::FontCfgWrapper()
722
- m_pDefConfig( NULL )
723
+ m_pDefConfig( NULL ),
724
+ m_pOutlineSet( NULL )
726
#ifdef ENABLE_FONTCONFIG
727
OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) );
728
@@ -220,12 +249,20 @@ FontCfgWrapper::FontCfgWrapper()
729
loadSymbol( "FcPatternDestroy" );
730
m_pFcFontList = (FcFontSet*(*)(FcConfig*,FcPattern*,FcObjectSet*))
731
loadSymbol( "FcFontList" );
732
+ m_pFcConfigGetFonts = (FcFontSet*(*)(FcConfig*,FcSetName))
733
+ loadSymbol( "FcConfigGetFonts" );
734
m_pFcFontSetCreate = (FcFontSet*(*)())
735
loadSymbol( "FcFontSetCreate" );
736
+ m_pFcCharSetCreate = (FcCharSet*(*)())
737
+ loadSymbol( "FcCharSetCreate" );
738
+ m_pFcCharSetAddChar = (FcBool(*)(FcCharSet*, FcChar32))
739
+ loadSymbol( "FcCharSetAddChar" );
740
m_pFcFontSetDestroy = (void(*)(FcFontSet*))
741
loadSymbol( "FcFontSetDestroy" );
742
m_pFcFontSetAdd = (FcBool(*)(FcFontSet*,FcPattern*))
743
loadSymbol( "FcFontSetAdd" );
744
+ m_pFcPatternReference = (void(*)(FcPattern*))
745
+ loadSymbol( "FcPatternReference" );
746
m_pFcPatternGetString = (FcResult(*)(const FcPattern*,const char*,int,FcChar8**))
747
loadSymbol( "FcPatternGetString" );
748
m_pFcPatternGetInteger = (FcResult(*)(const FcPattern*,const char*,int,int*))
749
@@ -236,12 +273,16 @@ FontCfgWrapper::FontCfgWrapper()
750
loadSymbol( "FcPatternGetBool" );
751
m_pFcDefaultSubstitute = (void(*)(FcPattern *))
752
loadSymbol( "FcDefaultSubstitute" );
753
- m_pFcFontMatch = (FcPattern*(*)(FcConfig*,FcPattern*,FcResult*))
754
- loadSymbol( "FcFontMatch" );
755
+ m_pFcFontSetMatch = (FcPattern*(*)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*))
756
+ loadSymbol( "FcFontSetMatch" );
757
m_pFcConfigSubstitute = (FcBool(*)(FcConfig*,FcPattern*,FcMatchKind))
758
loadSymbol( "FcConfigSubstitute" );
759
m_pFcPatternAddInteger = (FcBool(*)(FcPattern*,const char*,int))
760
loadSymbol( "FcPatternAddInteger" );
761
+ m_pFcPatternAddBool = (FcBool(*)(FcPattern*,const char*,FcBool))
762
+ loadSymbol( "FcPatternAddBool" );
763
+ m_pFcPatternAddCharSet = (FcBool(*)(FcPattern*,const char*,const FcCharSet *))
764
+ loadSymbol( "FcPatternAddCharSet" );
765
m_pFcPatternAddString = (FcBool(*)(FcPattern*,const char*,const FcChar8*))
766
loadSymbol( "FcPatternAddString" );
768
@@ -253,17 +294,23 @@ FontCfgWrapper::FontCfgWrapper()
769
m_pFcPatternCreate &&
770
m_pFcPatternDestroy &&
772
+ m_pFcConfigGetFonts &&
773
m_pFcFontSetCreate &&
774
+ m_pFcCharSetCreate &&
775
+ m_pFcCharSetAddChar &&
776
m_pFcFontSetDestroy &&
778
+ m_pFcPatternReference &&
779
m_pFcPatternGetString &&
780
m_pFcPatternGetInteger &&
781
m_pFcPatternGetDouble &&
782
m_pFcPatternGetBool &&
783
m_pFcDefaultSubstitute &&
785
+ m_pFcFontSetMatch &&
786
m_pFcConfigSubstitute &&
787
m_pFcPatternAddInteger &&
788
+ m_pFcPatternAddCharSet &&
789
+ m_pFcPatternAddBool &&
790
m_pFcPatternAddString
793
@@ -281,10 +328,35 @@ FontCfgWrapper::FontCfgWrapper()
794
osl_unloadModule( (oslModule)m_pLib );
798
+ m_pOutlineSet = FcFontSetCreate();
801
+ add only acceptable outlined fonts to our config,
802
+ for future fontconfig use
804
+ FcFontSet *pOrig = FcConfigGetFonts(NULL, FcSetSystem);
809
+ for( int i = 0; i < pOrig->nfont; ++i )
811
+ FcBool outline = false;
812
+ FcPattern *pOutlinePattern = pOrig->fonts[i];
814
+ FcPatternGetBool( pOutlinePattern, FC_OUTLINE, 0, &outline );
815
+ if (eOutRes == FcResultMatch && !outline)
817
+ FcPatternReference(pOutlinePattern);
818
+ FcFontSetAdd(m_pOutlineSet, pOutlinePattern);
822
FontCfgWrapper::~FontCfgWrapper()
824
+ if( m_pOutlineSet )
825
+ FcFontSetDestroy( m_pOutlineSet );
827
osl_unloadModule( (oslModule)m_pLib );
829
@@ -319,18 +391,7 @@ bool PrintFontManager::initFontconfig()
830
if( ! rWrapper.isValid() )
833
- FcConfig* pConfig = rWrapper.getDefConfig();
834
- FcObjectSet* pOSet = rWrapper.FcObjectSetBuild( FC_FAMILY,
843
- FcPattern* pPattern = rWrapper.FcPatternCreate();
844
- FcFontSet* pFSet = rWrapper.FcFontList( pConfig, pPattern, pOSet );
845
+ FcFontSet* pFSet = rWrapper.getFontSet();
849
@@ -373,6 +434,8 @@ bool PrintFontManager::initFontconfig()
853
+ OSL_ASSERT(eOutRes != FcResultMatch || outline);
855
// only outline fonts are usable to psprint anyway
856
if( eOutRes == FcResultMatch && ! outline )
858
@@ -515,14 +578,6 @@ bool PrintFontManager::initFontconfig()
864
- rWrapper.FcPatternDestroy( pPattern );
866
- rWrapper.FcFontSetDestroy( pFSet );
868
- rWrapper.FcObjectSetDestroy( pOSet );
870
// how does one get rid of the config ?
871
#if OSL_DEBUG_LEVEL > 1
872
fprintf( stderr, "inserted %d fonts from fontconfig\n", nFonts );
873
@@ -536,39 +591,14 @@ void PrintFontManager::deinitFontconfig(
874
FontCfgWrapper::release();
877
-bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale )
878
+static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern,
879
+ italic::type eItalic, weight::type eWeight, width::type eWidth, pitch::type ePitch)
881
#ifdef ENABLE_FONTCONFIG
882
- FontCfgWrapper& rWrapper = FontCfgWrapper::get();
883
- if( ! rWrapper.isValid() )
886
- FcConfig* pConfig = rWrapper.getDefConfig();
887
- FcPattern* pPattern = rWrapper.FcPatternCreate();
889
- OString aLangAttrib;
890
- // populate pattern with font characteristics
891
- if( rLocale.Language.getLength() )
893
- OUStringBuffer aLang(6);
894
- aLang.append( rLocale.Language );
895
- if( rLocale.Country.getLength() )
897
- aLang.append( sal_Unicode('-') );
898
- aLang.append( rLocale.Country );
900
- aLangAttrib = OUStringToOString( aLang.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
902
- if( aLangAttrib.getLength() )
903
- rWrapper.FcPatternAddString( pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr() );
905
- OString aFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 );
906
- if( aFamily.getLength() )
907
- rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)aFamily.getStr() );
908
- if( rInfo.m_eItalic != italic::Unknown )
909
+ if( eItalic != italic::Unknown )
911
int nSlant = FC_SLANT_ROMAN;
912
- switch( rInfo.m_eItalic )
915
case italic::Italic: nSlant = FC_SLANT_ITALIC;break;
916
case italic::Oblique: nSlant = FC_SLANT_OBLIQUE;break;
917
@@ -577,10 +607,10 @@ bool PrintFontManager::matchFont( FastPr
919
rWrapper.FcPatternAddInteger( pPattern, FC_SLANT, nSlant );
921
- if( rInfo.m_eWeight != weight::Unknown )
922
+ if( eWeight != weight::Unknown )
924
int nWeight = FC_WEIGHT_NORMAL;
925
- switch( rInfo.m_eWeight )
928
case weight::Thin: nWeight = FC_WEIGHT_THIN;break;
929
case weight::UltraLight: nWeight = FC_WEIGHT_ULTRALIGHT;break;
930
@@ -597,10 +627,10 @@ bool PrintFontManager::matchFont( FastPr
932
rWrapper.FcPatternAddInteger( pPattern, FC_WEIGHT, nWeight );
934
- if( rInfo.m_eWidth != width::Unknown )
935
+ if( eWidth != width::Unknown )
937
int nWidth = FC_WIDTH_NORMAL;
938
- switch( rInfo.m_eWidth )
941
case width::UltraCondensed: nWidth = FC_WIDTH_ULTRACONDENSED;break;
942
case width::ExtraCondensed: nWidth = FC_WIDTH_EXTRACONDENSED;break;
943
@@ -616,10 +646,10 @@ bool PrintFontManager::matchFont( FastPr
945
rWrapper.FcPatternAddInteger( pPattern, FC_WIDTH, nWidth );
947
- if( rInfo.m_ePitch != pitch::Unknown )
948
+ if( ePitch != pitch::Unknown )
950
int nSpacing = FC_PROPORTIONAL;
951
- switch( rInfo.m_ePitch )
954
case pitch::Fixed: nSpacing = FC_MONO;break;
955
case pitch::Variable: nSpacing = FC_PROPORTIONAL;break;
956
@@ -627,12 +657,123 @@ bool PrintFontManager::matchFont( FastPr
959
rWrapper.FcPatternAddInteger( pPattern, FC_SPACING, nSpacing );
960
+ if (nSpacing == FC_MONO)
961
+ rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)"monospace");
966
+String PrintFontManager::Substitute(const std::vector<String> &rNames, const std::vector<sal_Unicode> &rGlyphs,
967
+ const ByteString &rLangAttrib, italic::type eItalic, weight::type eWeight,
968
+ width::type eWidth, pitch::type ePitch) const
971
+#ifdef ENABLE_FONTCONFIG
972
+ FontCfgWrapper& rWrapper = FontCfgWrapper::get();
973
+ if( ! rWrapper.isValid() )
976
+ FcFontSet* pSet = NULL;
977
+ FcPattern* pPattern = rWrapper.FcPatternCreate();
979
+ // Prefer scalable fonts
980
+ rWrapper.FcPatternAddBool( pPattern, FC_SCALABLE, 1 );
982
+ std::vector<String>::const_iterator aEnd = rNames.end();
983
+ for (std::vector<String>::const_iterator aIter = rNames.begin(); aIter != aEnd; ++aIter)
985
+ OString maTargetName = OUStringToOString(*aIter, RTL_TEXTENCODING_UTF8);
986
+ rWrapper.FcPatternAddString(pPattern, FC_FAMILY, (FcChar8*)maTargetName.getStr());
990
+ if( rLangAttrib.Len() )
991
+ rWrapper.FcPatternAddString(pPattern, FC_LANG, (FcChar8*)rLangAttrib.GetBuffer());
993
+ // Add required Unicode characters, if any
994
+ FcCharSet *unicodes = NULL;
995
+ if (! rGlyphs.empty() )
997
+ unicodes = rWrapper.FcCharSetCreate();
998
+ std::vector<sal_Unicode>::const_iterator aGlyphEnd = rGlyphs.end();
999
+ for (std::vector<sal_Unicode>::const_iterator aGlyphIter = rGlyphs.begin();
1000
+ aGlyphIter != aGlyphEnd; ++aGlyphIter)
1002
+ rWrapper.FcCharSetAddChar( unicodes, (FcChar32)*aGlyphIter );
1004
+ rWrapper.FcPatternAddCharSet( pPattern, FC_CHARSET, unicodes);
1007
+ addtopattern(rWrapper, pPattern, eItalic, eWeight, eWidth, ePitch);
1009
+ rWrapper.FcConfigSubstitute( NULL, pPattern, FcMatchPattern );
1010
+ rWrapper.FcDefaultSubstitute( pPattern );
1011
+ FcResult eResult = FcResultNoMatch;
1012
+ FcFontSet *pFontSet = rWrapper.getFontSet();
1013
+ FcPattern* pResult = rWrapper.FcFontSetMatch( NULL, &pFontSet, 1, pPattern, &eResult );
1014
+ rWrapper.FcPatternDestroy( pPattern );
1018
+ pSet = rWrapper.FcFontSetCreate();
1019
+ // info: destroying the pSet destroys pResult implicitly
1020
+ // since pResult was "added" to pSet
1021
+ rWrapper.FcFontSetAdd( pSet, pResult );
1026
+ if( pSet->nfont > 0 )
1028
+ //extract the closest match
1029
+ FcChar8* family = NULL;
1030
+ FcResult eFileRes = rWrapper.FcPatternGetString( pSet->fonts[0], FC_FAMILY, 0, &family );
1031
+ if( eFileRes == FcResultMatch )
1032
+ aName = String( (sal_Char*)family, RTL_TEXTENCODING_UTF8 );
1035
+ rWrapper.FcFontSetDestroy( pSet );
1040
+bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale )
1042
+#ifdef ENABLE_FONTCONFIG
1043
+ FontCfgWrapper& rWrapper = FontCfgWrapper::get();
1044
+ if( ! rWrapper.isValid() )
1047
+ FcConfig* pConfig = rWrapper.getDefConfig();
1048
+ FcPattern* pPattern = rWrapper.FcPatternCreate();
1050
+ OString aLangAttrib;
1051
+ // populate pattern with font characteristics
1052
+ if( rLocale.Language.getLength() )
1054
+ OUStringBuffer aLang(6);
1055
+ aLang.append( rLocale.Language );
1056
+ if( rLocale.Country.getLength() )
1058
+ aLang.append( sal_Unicode('-') );
1059
+ aLang.append( rLocale.Country );
1061
+ aLangAttrib = OUStringToOString( aLang.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
1063
+ if( aLangAttrib.getLength() )
1064
+ rWrapper.FcPatternAddString( pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr() );
1066
+ OString aFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 );
1067
+ if( aFamily.getLength() )
1068
+ rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)aFamily.getStr() );
1070
+ addtopattern(rWrapper, pPattern, rInfo.m_eItalic, rInfo.m_eWeight, rInfo.m_eWidth, rInfo.m_ePitch);
1072
rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern );
1073
rWrapper.FcDefaultSubstitute( pPattern );
1074
FcResult eResult = FcResultNoMatch;
1075
- FcPattern* pResult = rWrapper.FcFontMatch( pConfig, pPattern, &eResult );
1076
+ FcFontSet *pFontSet = rWrapper.getFontSet();
1077
+ FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &pFontSet, 1, pPattern, &eResult );
1078
bool bSuccess = false;
1
Index: source/helper/statusindicatorfactory.cxx
2
===================================================================
3
RCS file: /cvs/framework/framework/source/helper/statusindicatorfactory.cxx,v
4
retrieving revision 1.21
5
diff -u -p -u -r1.21 statusindicatorfactory.cxx
6
--- framework/source/helper/statusindicatorfactory.cxx 23 Sep 2005 15:41:23 -0000 1.21
7
+++ framework/source/helper/statusindicatorfactory.cxx 4 Jan 2006 21:41:06 -0000
8
@@ -496,9 +496,11 @@ void StatusIndicatorFactory::implts_make
10
if (xParentWindow.is())
11
xParentWindow->setVisible(sal_True);
13
css::uno::Reference< css::awt::XTopWindow > xParentWindowTop(xParentWindow, css::uno::UNO_QUERY);
14
if (xParentWindowTop.is())
15
xParentWindowTop->toFront();
19
//-----------------------------------------------
20
Index: source/loadenv/loadenv.cxx
21
===================================================================
22
RCS file: /cvs/framework/framework/source/loadenv/loadenv.cxx,v
23
retrieving revision 1.21
24
diff -u -p -u -r1.21 loadenv.cxx
25
--- framework/source/loadenv/loadenv.cxx 11 Nov 2005 12:06:12 -0000 1.21
26
+++ framework/source/loadenv/loadenv.cxx 4 Jan 2006 21:41:08 -0000
27
@@ -1774,9 +1774,10 @@ void LoadEnv::impl_makeFrameWindowVisibl
30
xWindow->setVisible(sal_True);
34
xTopWindow->toFront();
38
We tried to prevent a toFront() call in case the user putted the