diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-23 14:33:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-23 14:49:27 +0000 |
commit | 98f56121858b4bea54d056a073005a10648785c6 (patch) | |
tree | febb83499b43bdcc03361b458db450c46de14e05 /vcl/inc/sallayout.hxx | |
parent | 4aa908cf3a63bf4117357a8fbaeb2fd8dd5be310 (diff) |
fdo#54629 MultiSalLayout::GetBoundRect always uses level 0 fallback font
...in X11SalGraphics::GetGlyphBoundRect
In MultiSalLayout::GetBoundRect we loop through each fallback font and union
each level's GetBoundRect to get the result, which seems reasonable, except
that for each level that means a call to SalLayout::GetBoundRect which calls
X11SalGraphics::GetGlyphBoundRect.
Those sublevel SalLayouts don't know that they are sublevels so they never set
the level bits on their glyphs. Which results in
X11SalGraphics::GetGlyphBoundRect always searching for that glyph in the level
0 font, so there's a mismatch between the font the SalLayout's are created to
use and the font that gets used.
Now, SalLayout::GetBoundRect is a fairly simple thing, it just calls
GetNextGlyphs 1 by 1 and X11SalGraphics::GetGlyphBoundRect on the result of
that. So I *think* that if we remove the specialized
MultiSalLayout::GetBoundRect in favour of the default implementation, then
because MultiSalLayout::GetNextGlyphs is specialized to do-the-right-thing and
set up the glyph ids correctly, then we bubble the ids down
to X11SalGraphics::GetGlyphBoundRect correctly to get it to
use the right font and we get the correct bounding size.
defb4d60a2d22fd36a0ff3f077faa6a0932b45a4
defb4d60a2d22fd36a0ff3f077faa6a0932b45a4
Change-Id: Idefb4d60a2d22fd36a0ff3f077faa6a0932b45a4
Diffstat (limited to 'vcl/inc/sallayout.hxx')
-rw-r--r-- | vcl/inc/sallayout.hxx | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index c430097f2581..e86ecdbe1ca4 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -250,7 +250,6 @@ public: virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, int&, sal_Int32* pGlyphAdvAry, int* pCharPosAry ) const; virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const; - virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; // used only by OutputDevice::ImplLayout, TODO: make friend explicit MultiSalLayout( SalLayout& rBaseLayout, |