ooo-build r12508 - branches/ooo-build-2-4/patches/src680



Author: freuter
Date: Fri May  9 14:39:11 2008
New Revision: 12508
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12508&view=rev

Log:
Fix for the symbol font problem. See #n383812.

Added:
   branches/ooo-build-2-4/patches/src680/sw-symbol-font-n383812.diff
Modified:
   branches/ooo-build-2-4/patches/src680/apply

Modified: branches/ooo-build-2-4/patches/src680/apply
==============================================================================
--- branches/ooo-build-2-4/patches/src680/apply	(original)
+++ branches/ooo-build-2-4/patches/src680/apply	Fri May  9 14:39:11 2008
@@ -360,7 +360,7 @@
 
 [ Fixes ]
 # Fix for the symbol font problem. See #n383812.
-sw-symbol-font-n383812.patch, #n383812, flr
+sw-symbol-font-n383812.diff, #n383812
 
 # fix strage spell-checking behaviour, n#377345, i#88120, michael
 spellcheck-fix.diff

Added: branches/ooo-build-2-4/patches/src680/sw-symbol-font-n383812.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4/patches/src680/sw-symbol-font-n383812.diff	Fri May  9 14:39:11 2008
@@ -0,0 +1,70 @@
+diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
+index 5c7118b..2281099 100644
+--- sw/source/core/txtnode/fntcache.cxx
++++ sw/source/core/txtnode/fntcache.cxx
+@@ -563,9 +563,14 @@ static sal_Char __READONLY_DATA sStandardString[] = "Dies ist der Teststring";
+ 				// Font wird nun nochmals auf dem Drucker eingestellt.
+ 				Font aFnt1 = pOut->GetFontMetric();
+ 				Font aFnt2( *pPrtFont );
+-				aFnt2.SetCharSet( aFnt1.GetCharSet() );
+-				aFnt2.SetFamily( aFnt1.GetFamily() );
+-				aFnt2.SetPitch( aFnt1.GetPitch() );
++
++				if (RTL_TEXTENCODING_DONTKNOW == pPrtFont->GetCharSet())
++				    aFnt2.SetCharSet( aFnt1.GetCharSet() );
++				if (FAMILY_DONTKNOW  == pPrtFont->GetFamily())
++				    aFnt2.SetFamily( aFnt1.GetFamily() );
++				if (PITCH_DONTKNOW   == pPrtFont->GetPitch())
++				    aFnt2.SetPitch( aFnt1.GetPitch() );
++
+ 				pPrt->SetFont( aFnt2 );
+ 				aMet = pPrt->GetFontMetric( );
+ 			}
+diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
+index 460b16b..b32dcc1 100644
+--- vcl/source/gdi/outdev3.cxx
++++ vcl/source/gdi/outdev3.cxx
+@@ -2846,6 +2846,17 @@ bool ImplFontCache::IFSD_Equal::operator()(const ImplFontSelectData& rA, const I
+     if( rA.maStyleName != rB.maStyleName)
+         return false;
+ 
++    // Symbol fonts may recode from one type to another So they are only
++    // safely equivalent for equal targets
++    if (
++        (rA.mpFontData && rA.mpFontData->IsSymbolFont()) ||
++        (rB.mpFontData && rB.mpFontData->IsSymbolFont())
++       )
++    {
++        if (rA.maTargetName != rB.maTargetName)
++            return false;
++    }
++
+     return true;
+ }
+ 
+diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
+index c03597d..b12c369 100644
+--- vcl/source/glyphs/gcach_ftyp.cxx
++++ vcl/source/glyphs/gcach_ftyp.cxx
+@@ -931,11 +931,21 @@ int FreetypeServerFont::GetEmUnits() const
+ void FreetypeServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
+ {
+     static_cast<ImplFontAttributes&>(rTo) = mpFontInfo->GetFontAttributes();
++
+     rTo.mbScalableFont  = true;
+     rTo.mbDevice        = true;
+     rTo.mbKernableFont  = (FT_HAS_KERNING( maFaceFT ) != 0) || mpFontInfo->HasExtraKerning();
+     rTo.mnOrientation = GetFontSelData().mnOrientation;
+ 
++    //Always consider [star]symbol as symbol fonts
++    if (
++         (rTo.GetFamilyName().EqualsAscii("OpenSymbol")) ||
++         (rTo.GetFamilyName().EqualsAscii("StarSymbol"))
++       )
++    {
++        rTo.mbSymbolFlag = true;
++    }
++
+     if( maSizeFT )
+         pFTActivateSize( maSizeFT );
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]