diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-28 13:18:42 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-04-29 12:45:40 +0200 |
commit | 1f7d7d0f327aff54af8f9fa8b60e2460827dc4e1 (patch) | |
tree | 5dfda07446331e09cb9765606eb59c8258a44b57 /vcl/inc/generic | |
parent | 2e302f18efe8f2e5f3c17d7734a8adcb670fbe42 (diff) |
[harfbuzz] Fix text width calculation for real
No more second guessing if text width, we know that information already,
so pass it around instead of trying to re-create it.
Change-Id: I19faacbc309d38753c3c9f7214dfa0bf59cc66b5
Diffstat (limited to 'vcl/inc/generic')
-rw-r--r-- | vcl/inc/generic/glyphcache.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx index 2225971673e1..cb4ffceaef0f 100644 --- a/vcl/inc/generic/glyphcache.hxx +++ b/vcl/inc/generic/glyphcache.hxx @@ -319,6 +319,7 @@ private: SAL_DLLPRIVATE ServerFontLayout& operator=( const ServerFontLayout& ); bool bUseHarfBuzz; + long mnTextWidth; public: ServerFontLayout( ServerFont& ); @@ -328,6 +329,10 @@ public: virtual void DrawText( SalGraphics& ) const; virtual long GetTextWidth() const; ServerFont& GetServerFont() const { return mrServerFont; } + + // used by layout engine + void SetWidth( long nWidth ) { mnTextWidth = nWidth; } + long GetWidth() const { return mnTextWidth; } }; // ======================================================================= |