[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Mon May 27 06:00:04 PDT 2013


 vcl/source/gdi/outdev3.cxx |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 376830eb55eedf2ca31b431dd27ea9ce0df9b2f8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon May 27 13:29:23 2013 +0100

    Generalize the check for a recode table
    
    I think we can distill this down to a "if the source or target
    is a symbol font check for a recode table"
    
    Change-Id: I6c674f10d9f1ab7fbe7274abfafb9082bae88218

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index a4fde37..3281557 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2287,8 +2287,9 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList,
         // create a new logical font instance from this physical font face
         pEntry = pFontData->CreateFontInstance( aFontSelData );
 
-        // if we found a different symbol font we need a symbol conversion table
-        if( pFontData->IsSymbolFont() )
+        // if we're subtituting from or to a symbol font we may need a symbol
+        // conversion table
+        if( pFontData->IsSymbolFont() || aFontSelData.IsSymbolFont() )
         {
             if( aFontSelData.maTargetName != aFontSelData.maSearchName )
                 pEntry->mpConversion = ConvertChar::GetRecodeData( aFontSelData.maTargetName, aFontSelData.maSearchName );
@@ -2309,13 +2310,6 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList,
         maFontInstanceList[ aFontSelData ] = pEntry;
     }
 
-    // We might have selected a non-symbol font as a fallback for a
-    // symbol font. Ensure that conversion is done
-    if (aFontSelData.IsSymbolFont() && !pEntry->maMetric.IsSymbolFont() && !pEntry->mpConversion)
-    {
-        pEntry->mpConversion = ConvertChar::GetRecodeData( aFontSelData.maTargetName, aFontSelData.maSearchName );
-    }
-
     mpFirstEntry = pEntry;
     return pEntry;
 }


More information about the Libreoffice-commits mailing list