summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-04-27 14:47:29 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2013-04-29 12:45:39 +0200
commit9cd7f7aded9ba171bf91a8223e6e8a868aedd792 (patch)
tree8278a59d00c192e6627cc8dc81128ce16d00d714 /vcl/inc
parentfc893070c9255637950ac9844c1ad519b0115bd8 (diff)
[harfbuzz] Fix text width calculation
GenericSalLayout::GetTextWidth() uses GlyphItem's mnNewWidth when calculating text width, and though this seems logical (it is after all the actual with the glyph is contributing to the all over advance width), it results in shorter width calculation whenever glyph width adjustment is involved, no idea why! The #ifdef is there so that the ICU code path is not changed in anyway, but all of this should be merged into GenericSalLayout when ICU is gone. Change-Id: I7cbde1675b78e87c142513eb52a13ee5fdc60617
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/generic/glyphcache.hxx1
-rw-r--r--vcl/inc/sallayout.hxx2
2 files changed, 3 insertions, 0 deletions
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index cc3ae497c584..322dd750925f 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -324,6 +324,7 @@ public:
virtual void AdjustLayout( ImplLayoutArgs& );
virtual void ApplyDXArray( ImplLayoutArgs& );
virtual void DrawText( SalGraphics& ) const;
+ virtual long GetTextWidth() const;
ServerFont& GetServerFont() const { return mrServerFont; }
};
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index ad6cd9479ab5..6f8a49d82a59 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -367,6 +367,8 @@ protected:
bool GetCharWidths( sal_Int32* pCharWidths ) const;
+ GlyphVector GetGlyphItems() const { return m_GlyphItems; }
+
private:
GlyphVector m_GlyphItems;
mutable Point maBasePoint;