diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-05-09 09:51:35 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-05-09 09:51:35 +0000 |
commit | ca117a77503adee23f3750ec1517bfbd9598c661 (patch) | |
tree | 3734b39fb980e8224b0bbc8d3a38467d95033c06 /psprint | |
parent | 8deca0a1ca6d061471aabbab2b545b5b34541864 (diff) |
getAfmFile for Builtin fonts
Diffstat (limited to 'psprint')
-rw-r--r-- | psprint/source/fontmanager/fontmanager.cxx | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/psprint/source/fontmanager/fontmanager.cxx b/psprint/source/fontmanager/fontmanager.cxx index a23f70901fd4..e9b1044d87f6 100644 --- a/psprint/source/fontmanager/fontmanager.cxx +++ b/psprint/source/fontmanager/fontmanager.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fontmanager.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: pl $ $Date: 2001-05-08 11:45:35 $ + * last change: $Author: pl $ $Date: 2001-05-09 10:51:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1859,13 +1859,27 @@ const ::rtl::OUString& PrintFontManager::getFontFamily( fontID nFontID ) const OString PrintFontManager::getAfmFile( PrintFont* pFont ) const { OString aMetricPath; - if( pFont && pFont->m_eType == fonttype::Type1 ) + if( pFont ) { - Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); - ::std::hash_map< int, OString >::const_iterator it = m_aAtomToDir.find( pPSFont->m_nDirectory ); - aMetricPath = it->second; - aMetricPath += "/"; - aMetricPath += pPSFont->m_aMetricFile; + switch( pFont->m_eType ) + { + case fonttype::Type1: + { + Type1FontFile* pPSFont = static_cast< Type1FontFile* >(pFont); + aMetricPath = getDirectory( pPSFont->m_nDirectory ); + aMetricPath += "/"; + aMetricPath += pPSFont->m_aMetricFile; + } + break; + case fonttype::Builtin: + { + BuiltinFont* pBuiltinFont = static_cast< BuiltinFont* >(pFont); + aMetricPath = getDirectory( pBuiltinFont->m_nDirectory ); + aMetricPath += "/"; + aMetricPath += pBuiltinFont->m_aMetricFile; + } + break; + } } return aMetricPath; } |