summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-01-13 17:00:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-01-14 10:54:22 +0000
commitb008831a5545e5a777d77547ef96b9798d795f30 (patch)
tree78752d207db0c48ed177b5d461005f1dcaf81f06 /drawinglayer
parent8d97a90564abba49dcc072d33ddd12c93f4992fe (diff)
tdf#152990 set the font after the MapMode is (potentially) set
Change-Id: I64617a5c85e7e6b444aac705ebbfdd777b4ea55a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index bd92921396ae..8bd9abadf15c 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -306,7 +306,6 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
mpOutputDevice->SetLayoutMode(nRTLLayoutMode);
}
- mpOutputDevice->SetFont(aFont);
mpOutputDevice->SetTextColor(Color(aRGBFontColor));
OUString aText(rTextCandidate.getText());
@@ -364,6 +363,10 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
mpOutputDevice->SetMapMode(aMapMode);
}
+ // tdf#152990 set the font after the MapMode is (potentially) set so canvas uses the desired
+ // font size
+ mpOutputDevice->SetFont(aFont);
+
if (!aDXArray.empty())
{
const SalLayoutGlyphs* pGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs(