summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/sallayout.cxx18
-rw-r--r--vcl/source/outdev/text.cxx2
2 files changed, 16 insertions, 4 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 64b1d22480e5..be020c2f11ae 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -135,7 +135,8 @@ SalLayout::SalLayout()
mnEndCharPos( -1 ),
mnUnitsPerPixel( 1 ),
mnOrientation( 0 ),
- maDrawOffset( 0, 0 )
+ maDrawOffset( 0, 0 ),
+ mbTextRenderModeForResolutionIndependentLayout(false)
{}
SalLayout::~SalLayout()
@@ -171,9 +172,18 @@ DevicePoint SalLayout::GetDrawPosition(const DevicePoint& rRelative) const
double fX = aOfs.getX();
double fY = aOfs.getY();
- tools::Long nX = static_cast<tools::Long>( +fCos * fX + fSin * fY );
- tools::Long nY = static_cast<tools::Long>( +fCos * fY - fSin * fX );
- aPos += DevicePoint(nX, nY);
+ if (mbTextRenderModeForResolutionIndependentLayout)
+ {
+ double nX = +fCos * fX + fSin * fY;
+ double nY = +fCos * fY - fSin * fX;
+ aPos += DevicePoint(nX, nY);
+ }
+ else
+ {
+ tools::Long nX = static_cast<tools::Long>( +fCos * fX + fSin * fY );
+ tools::Long nY = static_cast<tools::Long>( +fCos * fY - fSin * fX );
+ aPos += DevicePoint(nX, nY);
+ }
}
return aPos;
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index f9f0fd54b673..49ca790b8aec 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1411,6 +1411,8 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr,
if( !pSalLayout )
return nullptr;
+ pSalLayout->SetTextRenderModeForResolutionIndependentLayout(bTextRenderModeForResolutionIndependentLayout);
+
// do glyph fallback if needed
// #105768# avoid fallback for very small font sizes
if (aLayoutArgs.HasFallbackRun() && mpFontInstance->GetFontSelectPattern().mnHeight >= 3)