diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-11-01 11:58:58 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-11-01 11:58:58 +0000 |
commit | 439b7fe573df9d685f7613201f96ffc5b08d2b6f (patch) | |
tree | 6b06283acfd2b5288ed0a6d489004138b716d600 /vcl/source/gdi/outdev3.cxx | |
parent | fca43a22133cce100252a7e00eb4d635552f9a1e (diff) |
INTEGRATION: CWS vcl43 (1.203.26); FILE MERGED
2005/08/25 14:16:23 hdu 1.203.26.2: #i53395# make sure the physical font is initialized for GetTextOutlines
2005/08/24 14:01:16 hdu 1.203.26.1: #i33947# keep EUDC as first glyph fallback font even when higher quality GF fonts are available
Diffstat (limited to 'vcl/source/gdi/outdev3.cxx')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 07f0b9182f35..da925339a5e6 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -4,9 +4,9 @@ * * $RCSfile: outdev3.cxx,v $ * - * $Revision: 1.207 $ + * $Revision: 1.208 $ * - * last change: $Author: rt $ $Date: 2005-10-17 14:50:47 $ + * last change: $Author: kz $ $Date: 2005-11-01 12:58:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -3031,6 +3031,7 @@ ImplFontEntry* ImplFontCache::GetFallback( ImplDevFontList* pFontList, 0 }; + bool bHasEudc = false; int nMaxLevel = 0; int nBestQuality = 0; ImplDevFontListData** pFallbackList = NULL; @@ -3064,16 +3065,20 @@ ImplFontEntry* ImplFontCache::GetFallback( ImplDevFontList* pFontList, if( !pFallbackList ) pFallbackList = new ImplDevFontListData*[ MAX_FALLBACK ]; pFallbackList[ nMaxLevel ] = pFallbackFont; + if( !bHasEudc && !nMaxLevel ) + bHasEudc = (0 == strncmp( *ppNames, "eudc", 5 )); } } - // sort the fonts for glyph fallback by quality (highest first) + // sort the list of fonts for glyph fallback by quality (highest first) + // #i33947# keep the EUDC font at the front of the list // an insertion sort is good enough for this short list - for( int i = 1, j; i < nMaxLevel; ++i ) + const int nSortStart = bHasEudc ? 1 : 0; + for( int i = nSortStart+1, j; i < nMaxLevel; ++i ) { ImplDevFontListData* pTestFont = pFallbackList[ i ]; int nTestQuality = pTestFont->GetMinQuality(); - for( j = i; --j >= 0; ) + for( j = i; --j >= nSortStart; ) if( nTestQuality > pFallbackList[j]->GetMinQuality() ) pFallbackList[ j+1 ] = pFallbackList[ j ]; else @@ -7563,6 +7568,14 @@ BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rVector, const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen, BOOL bOptimize, const ULONG nTWidth, const sal_Int32* pDXArray ) const { + // the fonts need to be initialized + if( mbNewFont ) + ImplNewFont(); + if( mbInitFont ) + ImplInitFont(); + if( !mpFontEntry ) + return FALSE; + BOOL bRet = FALSE; rVector.clear(); if( nLen == STRING_LEN ) @@ -7722,7 +7735,8 @@ BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rVector, Bitmap aBmp( aVDev.GetBitmap(Point(0, 0), aSize)); PolyPolygon aPolyPoly; - if( !aBmp.Vectorize(aPolyPoly, BMP_VECTORIZE_OUTER | BMP_VECTORIZE_REDUCE_EDGES) ) + bool bVectorized = aBmp.Vectorize(aPolyPoly, BMP_VECTORIZE_OUTER | BMP_VECTORIZE_REDUCE_EDGES); + if( !bVectorized ) bSuccess = false; else { |