summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2007-12-12 12:16:19 +0000
committerKurt Zenker <kz@openoffice.org>2007-12-12 12:16:19 +0000
commitce5a05db49a34f70a7d2c24315f7711b438dfbbe (patch)
treeb5595b44fbce6cc888782bd513cd023e317ff93a /psprint
parent5d20a5c94c578e1bfcf01b339f8837cf1d4cf2a1 (diff)
INTEGRATION: CWS gfbfcfg (1.33.20); FILE MERGED
2007/11/27 12:46:05 hdu 1.33.20.8: RESYNC: (1.33-1.34); FILE MERGED 2007/09/26 13:33:42 hdu 1.33.20.7: #i54603# fix buildbot errors and warnings for non-fontconfig platforms 2007/09/17 13:57:14 hdu 1.33.20.6: #i54603# switch to rtl strings, support glyph fallbacks for surrogates, reintroduce update of missing codes container 2007/09/14 11:53:50 hdu 1.33.20.5: #i54603# delay fontconfig font enumeration until all appfonts are registered 2007/09/13 09:10:28 hdu 1.33.20.4: #i54603# add PrintFontManager::addFontconfigDir() method 2007/09/12 17:11:19 hdu 1.33.20.3: #i54603# change interface for fontconfig assisted glyph fallback substitutions to allow non-baseplane unicodes 2007/09/12 12:06:46 hdu 1.33.20.2: #i54603# allow compilation on wntmsci 2007/09/05 09:58:10 hdu 1.33.20.1: #i54603# apply Caolan's fontconfig based glyph fallback back
Diffstat (limited to 'psprint')
-rw-r--r--psprint/inc/psprint/fontmanager.hxx35
1 files changed, 27 insertions, 8 deletions
diff --git a/psprint/inc/psprint/fontmanager.hxx b/psprint/inc/psprint/fontmanager.hxx
index 88db8311325b..ef5102746d1c 100644
--- a/psprint/inc/psprint/fontmanager.hxx
+++ b/psprint/inc/psprint/fontmanager.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fontmanager.hxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: hr $ $Date: 2007-09-26 15:04:02 $
+ * last change: $Author: kz $ $Date: 2007-12-12 13:16:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -49,7 +49,6 @@
#ifndef _PSPRINT_HELPER_HXX_
#include <psprint/helper.hxx>
#endif
-
#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
#include <com/sun/star/lang/Locale.hpp>
#endif
@@ -244,10 +243,10 @@ class PrintFontManager
struct TrueTypeFontFile;
struct Type1FontFile;
struct BuiltinFont;
- friend class PrintFont;
- friend class TrueTypeFontFile;
- friend class Type1FontFile;
- friend class BuiltinFont;
+ friend struct PrintFont;
+ friend struct TrueTypeFontFile;
+ friend struct Type1FontFile;
+ friend struct BuiltinFont;
friend class FontCache;
struct PrintFontMetrics
@@ -413,7 +412,9 @@ class PrintFontManager
std::hash_multimap< sal_Unicode, sal_uInt8 > m_aUnicodeToAdobecode;
std::hash_multimap< sal_uInt8, sal_Unicode > m_aAdobecodeToUnicode;
- mutable FontCache* m_pFontCache;
+ mutable FontCache* m_pFontCache;
+ bool m_bFontconfigSuccess;
+
mutable std::vector< fontID > m_aOverrideFonts;
rtl::OString getAfmFile( PrintFont* pFont ) const;
@@ -456,10 +457,23 @@ class PrintFontManager
false else (e.g. no libfontconfig found)
*/
bool initFontconfig();
+ int countFontconfigFonts();
/* deinitialize fontconfig
*/
void deinitFontconfig();
+ /* register an application specific font directory for libfontconfig
+
+ since fontconfig is asked for font substitutes before OOo will check for font availability
+ and fontconfig will happily substitute fonts it doesn't know (e.g. "Arial Narrow" -> "DejaVu Sans Book"!)
+ it becomes necessary to tell the library about all the hidden font treasures
+
+ @returns
+ true if libfontconfig accepted the directory
+ false else (e.g. no libfontconfig found)
+ */
+ bool addFontconfigDir(const rtl::OString& rDirectory);
+
static bool parseXLFD( const rtl::OString& rXLFD, XLFDEntry& rEntry );
void parseXLFD_appendAliases( const std::list< rtl::OString >& rXLFDs, std::list< XLFDEntry >& rEntries ) const;
void initFontsAlias();
@@ -738,6 +752,11 @@ public:
*/
bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale );
+ rtl::OUString Substitute( const rtl::OUString& rFontName, rtl::OUString& rMissingCodes,
+ const rtl::OString& rLangAttrib, italic::type eItalic, weight::type eWeight,
+ width::type eWidth, pitch::type ePitch) const;
+ bool hasFontconfig() const { return m_bFontconfigSuccess; }
+
int FreeTypeCharIndex( void *pFace, sal_uInt32 aChar );
};