diff options
author | Herbert Duerr <hdu@openoffice.org> | 2001-03-07 12:02:11 +0000 |
---|---|---|
committer | Herbert Duerr <hdu@openoffice.org> | 2001-03-07 12:02:11 +0000 |
commit | f8a0d17b2b1b5e5eac0c7c9887bc07b1882aa827 (patch) | |
tree | 3a94f6140af7b76f03eaa19a4c526623915878a0 /vcl/unx | |
parent | c90a189318d3598dff68bc9f037ce10efb74fe91 (diff) |
use font mapping in upper layers
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/source/gdi/salgdi3.cxx | 59 |
1 files changed, 12 insertions, 47 deletions
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index 8427804a7d36..c4dc2957e6cc 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salgdi3.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.25 $ * - * last change: $Author: pl $ $Date: 2001-03-05 10:58:42 $ + * last change: $Author: hdu $ $Date: 2001-03-07 12:59:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -543,32 +543,10 @@ SalGraphicsData::SetFont( const ImplFontSelectData *pEntry ) if( pEntry->mpFontData && pEntry->mpFontData->mpSysData ) { #ifdef USE_BUILTIN_RASTERIZER - if( pEntry->mpFontData->mpSysData == SERVERFONT_MAGIC ) - { - // requesting a font provided by builtin rasterizer - mpServerSideFont = GlyphCache::GetInstance().CacheFont( *pEntry ); -#ifdef USE_PSPRINT - if( (m_pPrinterGfx != NULL) && (mpServerSideFont != NULL) ) - { - // we need to notify printergfx of the font change - int nFontId = mpServerSideFont->GetFontId(); - if( nFontId <= 0 ) - { - if( const ::rtl::OString* pOString = mpServerSideFont->GetFontFileName() ) - { - // we have a font file the printfontmanager should know about - ::rtl::OUString aFontFileName = OStringToOUString( *pOString, RTL_TEXTENCODING_UNICODE ); - int nFaceNum = mpServerSideFont->GetFontFaceNumber(); - psp::PrintFontManager& rPSPFontManager = psp::PrintFontManager::get(); - nFontId = rPSPFontManager.addFontFile( aFontFileName, nFaceNum ); - mpServerSideFont->SetFontId( nFontId ); - } - } - m_pPrinterGfx->SetFont( nFontId, pEntry->mnHeight, pEntry->mnWidth, pEntry->mnOrientation ); - } -#endif // USE_PSPRINT + // requesting a font provided by builtin rasterizer + mpServerSideFont = GlyphCache::GetInstance().CacheFont( *pEntry ); + if( mpServerSideFont ) return; - } #endif //USE_BUILTIN_RASTERIZER ExtendedXlfd *pSysFont = (ExtendedXlfd*)pEntry->mpFontData->mpSysData; @@ -1227,34 +1205,21 @@ SalGraphicsData::DrawText( USHORT SalGraphics::SetFont( ImplFontSelectData *pEntry ) { -#if defined(USE_PSPRINT) - if( (maGraphicsData.m_pPrinterGfx != NULL) -#ifdef USE_BUILTIN_RASTERIZER - && ( !pEntry->mpFontData || (pEntry->mpFontData->mpSysData != SERVERFONT_MAGIC) ) -#endif // USE_BUILTIN_RASTERIZER - ) +#ifdef USE_PSPRINT + if( (maGraphicsData.m_pPrinterGfx != NULL) ) { sal_Bool bVertical = pEntry->mbVertical; sal_Int32 nID = pEntry->mpFontData ? (sal_Int32)pEntry->mpFontData->mpSysData : 0; - return maGraphicsData.m_pPrinterGfx->SetFont( - nID, - pEntry->mnHeight, - pEntry->mnWidth, - pEntry->mnOrientation - ); + return maGraphicsData.m_pPrinterGfx->SetFont( nID, + pEntry->mnHeight, pEntry->mnWidth, pEntry->mnOrientation); } else - { #endif - - - maGraphicsData.SetFont( pEntry ); - return _IsPrinter() ? SAL_SETFONT_USEDRAWTEXTARRAY : 0; - -#if defined(USE_PSPRINT) + { + maGraphicsData.SetFont( pEntry ); + return _IsPrinter() ? SAL_SETFONT_USEDRAWTEXTARRAY : 0; } -#endif } // ---------------------------------------------------------------------------- |