INTEGRATION: CWS gfbfcfg (1.2.154); FILE MERGED
2007/11/20 11:43:06 hdu 1.2.154.6: #i83491# fix crash on optimized unxsols4.pro builds, use string reference to avoid needless refcounting 2007/11/12 10:32:11 hdu 1.2.154.5: #i83491# improve performance of glyph fallback hook by caching results 2007/09/17 14:03:36 hdu 1.2.154.4: #i54603# adjust to recent psprint API changes 2007/09/12 15:23:57 hdu 1.2.154.3: #i54603# add hooks for non-generic font substitutions 2007/09/07 15:06:49 hdu 1.2.154.2: Start to abstract font fallbacks to cleanup the previous patch The patch HAD to be applied though it was not close to ready, sorry When finished font fallback abstraction will solve these regressions - does not even compile on non-UNX platforms - introduces UNX-specific dependencies into platform-independent layers - kills the glyph- and font-fallback features on the non-UNX platforms - kills the features on UNX platforms that don't have up to date fontconfig lib or matching configuration entries - causes regressions for non-baseplane unicodes - kills the japanese EUDC feature 2007/09/05 09:58:33 hdu 1.2.154.1: #i54603# apply Caolan's fontconfig based glyph fallback patch
This commit is contained in:
parent
d55c4505f7
commit
483eee9d36
1 changed files with 34 additions and 11 deletions
|
@ -4,9 +4,9 @@
|
||||||
*
|
*
|
||||||
* $RCSfile: outfont.hxx,v $
|
* $RCSfile: outfont.hxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.2 $
|
* $Revision: 1.3 $
|
||||||
*
|
*
|
||||||
* last change: $Author: vg $ $Date: 2007-04-11 18:02:27 $
|
* last change: $Author: kz $ $Date: 2007-12-12 13:19:39 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to
|
* The Contents of this file are made available subject to
|
||||||
* the terms of GNU Lesser General Public License Version 2.1.
|
* the terms of GNU Lesser General Public License Version 2.1.
|
||||||
|
@ -65,7 +65,9 @@ class ImplDevFontListData;
|
||||||
class ImplGetDevFontList;
|
class ImplGetDevFontList;
|
||||||
class ImplGetDevSizeList;
|
class ImplGetDevSizeList;
|
||||||
class ImplFontEntry;
|
class ImplFontEntry;
|
||||||
struct ImplFontSubstEntry;
|
class ImplDirectFontSubstitution;
|
||||||
|
class ImplPreMatchFontSubstitution;
|
||||||
|
class ImplGlyphFallbackFontSubstitution;
|
||||||
class ImplFontSelectData;
|
class ImplFontSelectData;
|
||||||
class Font;
|
class Font;
|
||||||
class ImplCvtChar;
|
class ImplCvtChar;
|
||||||
|
@ -220,22 +222,32 @@ private:
|
||||||
typedef std::hash_map<const String, ImplDevFontListData*,FontNameHash> DevFontList;
|
typedef std::hash_map<const String, ImplDevFontListData*,FontNameHash> DevFontList;
|
||||||
DevFontList maDevFontList;
|
DevFontList maDevFontList;
|
||||||
|
|
||||||
|
ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution
|
||||||
|
ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyh fallback substitution
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ImplDevFontList();
|
ImplDevFontList();
|
||||||
~ImplDevFontList();
|
~ImplDevFontList();
|
||||||
|
|
||||||
|
// fill the list with device fonts
|
||||||
void Add( ImplFontData* );
|
void Add( ImplFontData* );
|
||||||
void Clear();
|
void Clear();
|
||||||
int Count() const { return maDevFontList.size(); }
|
int Count() const { return maDevFontList.size(); }
|
||||||
|
|
||||||
|
// find the device font
|
||||||
ImplDevFontListData* FindFontFamily( const String& rFontName ) const;
|
ImplDevFontListData* FindFontFamily( const String& rFontName ) const;
|
||||||
ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplFontSubstEntry* pDevSpecificSubst ) const;
|
ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplDirectFontSubstitution* ) const;
|
||||||
ImplDevFontListData* ImplFindBySearchName( const String& ) const;
|
ImplDevFontListData* ImplFindBySearchName( const String& ) const;
|
||||||
|
|
||||||
bool HasFallbacks() const;
|
// suggest fonts for glyph fallback
|
||||||
void SetFallbacks( ImplDevFontListData**, int nCount );
|
ImplDevFontListData* GetGlyphFallbackFont( ImplFontSelectData&,
|
||||||
ImplDevFontListData* GetFallback( int nIndex ) const;
|
rtl::OUString& rMissingCodes, int nFallbackLevel ) const;
|
||||||
|
|
||||||
|
// prepare platform specific font substitutions
|
||||||
|
void SetPreMatchHook( ImplPreMatchFontSubstitution* );
|
||||||
|
void SetFallbackHook( ImplGlyphFallbackFontSubstitution* );
|
||||||
|
|
||||||
|
// misc utilities
|
||||||
ImplDevFontList* Clone( bool bScalable, bool bEmbeddable ) const;
|
ImplDevFontList* Clone( bool bScalable, bool bEmbeddable ) const;
|
||||||
ImplGetDevFontList* GetDevFontList() const;
|
ImplGetDevFontList* GetDevFontList() const;
|
||||||
ImplGetDevSizeList* GetDevSizeList( const String& rFontName ) const;
|
ImplGetDevSizeList* GetDevSizeList( const String& rFontName ) const;
|
||||||
|
@ -252,11 +264,11 @@ protected:
|
||||||
ImplDevFontListData* FindDefaultFont() const;
|
ImplDevFontListData* FindDefaultFont() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ImplDevFontListData** mpFallbackList;
|
void InitGenericGlyphFallback() const;
|
||||||
int mnFallbackCount;
|
mutable ImplDevFontListData** mpFallbackList;
|
||||||
|
mutable int mnFallbackCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// --------------------
|
// --------------------
|
||||||
// - ImplKernPairData -
|
// - ImplKernPairData -
|
||||||
// --------------------
|
// --------------------
|
||||||
|
@ -332,7 +344,7 @@ class VCL_DLLPUBLIC ImplFontEntry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ImplFontEntry( const ImplFontSelectData& );
|
ImplFontEntry( const ImplFontSelectData& );
|
||||||
virtual ~ImplFontEntry() {}
|
virtual ~ImplFontEntry();
|
||||||
|
|
||||||
public: // TODO: make data members private
|
public: // TODO: make data members private
|
||||||
ImplFontSelectData maFontSelData; // FontSelectionData
|
ImplFontSelectData maFontSelData; // FontSelectionData
|
||||||
|
@ -344,6 +356,17 @@ public: // TODO: make data members private
|
||||||
short mnOwnOrientation; // text angle if lower layers don't rotate text themselves
|
short mnOwnOrientation; // text angle if lower layers don't rotate text themselves
|
||||||
short mnOrientation; // text angle in 3600 system
|
short mnOrientation; // text angle in 3600 system
|
||||||
bool mbInit; // true if maMetric member is valid
|
bool mbInit; // true if maMetric member is valid
|
||||||
|
|
||||||
|
void AddFallbackForUnicode( sal_UCS4, const String& rFontName );
|
||||||
|
bool GetFallbackForUnicode( sal_UCS4, String* pFontName ) const;
|
||||||
|
void IgnoreFallbackForUnicode( sal_UCS4, const String& rFontName );
|
||||||
|
|
||||||
|
private:
|
||||||
|
// cache of Unicode characters and replacement font names
|
||||||
|
// TODO: a fallback map can be shared with many other ImplFontEntries
|
||||||
|
// TODO: at least the ones which just differ in orientation, stretching or height
|
||||||
|
typedef ::std::hash_map<sal_UCS4,String> UnicodeFallbackList;
|
||||||
|
UnicodeFallbackList* mpUnicodeFallbackList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue