summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-06-02 08:49:56 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-06-02 08:49:56 +0000
commit143705b6587bff3364897c8f505692af808dcb07 (patch)
treec7bf4dcbd06245fefd00c12d6bbaf021cf24fbfe /psprint
parentccc482892c702edbe08d57948b5755f4a3ca90ea (diff)
INTEGRATION: CWS wot03 (1.68.2); FILE MERGED
2006/05/30 12:54:41 pl 1.68.2.1: #i65884# fix a problem with type1 metrics
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/fontmanager/fontmanager.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/psprint/source/fontmanager/fontmanager.cxx b/psprint/source/fontmanager/fontmanager.cxx
index d829ef6ce83d..01d38401a5bc 100644
--- a/psprint/source/fontmanager/fontmanager.cxx
+++ b/psprint/source/fontmanager/fontmanager.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fontmanager.cxx,v $
*
- * $Revision: 1.68 $
+ * $Revision: 1.69 $
*
- * last change: $Author: vg $ $Date: 2006-05-18 10:06:55 $
+ * last change: $Author: vg $ $Date: 2006-06-02 09:49:56 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2604,11 +2604,13 @@ void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& r
void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const
{
- if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+ if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) ||
+ ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty()
+ )
{
// might be a truetype font not analyzed or type1 without metrics read
if( pFont->m_eType == fonttype::Type1 )
- pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, true );
+ pFont->readAfmMetrics( getAfmFile( pFont ), m_pAtoms, false, false );
else if( pFont->m_eType == fonttype::TrueType )
analyzeTrueTypeFile( pFont );
}
@@ -3055,7 +3057,9 @@ bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, i
if( ! pFont )
return false;
- if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+ if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+ || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty()
+ )
{
// might be a font not yet analyzed
if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin )
@@ -3096,7 +3100,9 @@ bool PrintFontManager::getMetrics( fontID nFontID, sal_Unicode minCharacter, sal
if( ! pFont )
return false;
- if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+ if( ( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 )
+ || ! pFont->m_pMetrics || pFont->m_pMetrics->isEmpty()
+ )
{
// might be a font not yet analyzed
if( pFont->m_eType == fonttype::Type1 || pFont->m_eType == fonttype::Builtin )