diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-01-07 15:05:58 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-22 08:32:53 +0000 |
commit | bf417a38c401868bb246e846d4c697cf840771e1 (patch) | |
tree | 413b199377496888e58a16e21e5d7a2706b4e46f /vcl/inc | |
parent | 258f344021e7a229ae146e0214af19e45c59c032 (diff) |
tdf#96420: Re-introduce SimpleWinLayout
Fixes lots of problems with glyph layout. For instance the Cambria
case in tdf#95648. The UniscribeLayout class turned out to be much
less correct than one might have hoped.
Use OpenGL glyph caching also for SimpleWinLayout to avoid performance
decrease.
Corresponding commit in master is 4622689fad7ddff72cd08da9611ccfacdb0aa7bd
Change-Id: Ie3c00304ce58f84c7f54051f4c230b32bfc47d9f
Reviewed-on: https://gerrit.libreoffice.org/21653
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/win/salgdi.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 4ff01fa6ed43..3d0046ed9d4f 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -187,6 +187,7 @@ class WinSalGraphics : public SalGraphics friend class ScopedFont; friend class OpenGLCompatibleDC; friend class WinLayout; + friend class SimpleWinLayout; friend class UniscribeLayout; protected: @@ -214,6 +215,9 @@ private: RGNDATA* mpClipRgnData; // ClipRegion-Data RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts + bool mbFontKernInit; // FALSE: FontKerns must be queried + KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font + sal_uIntPtr mnFontKernPairCount;// Number of Kerning Pairs of the current Font int mnPenWidth; // Linienbreite public: @@ -330,6 +334,12 @@ protected: const SalBitmap* pAlphaBitmap) override; virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) override; +private: + // local helpers + + // get kernign pairs of the current font + sal_uLong GetKernPairs(); + public: // public SalGraphics methods, the interface to the independent vcl part @@ -451,7 +461,7 @@ void ImplGetLogFontFromFontSelect( HDC, const FontSelectPattern*, #define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS)) // #102411# Win's GCP mishandles kerning => we need to do it ourselves -// kerning pairs is sorted by +// SalGraphicsData::mpFontKernPairs is sorted by inline bool ImplCmpKernData( const KERNINGPAIR& a, const KERNINGPAIR& b ) { if( a.wFirst < b.wFirst ) |