summaryrefslogtreecommitdiff
path: root/drawinglayer/source/processor2d/vclprocessor2d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/processor2d/vclprocessor2d.cxx')
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx30
1 files changed, 12 insertions, 18 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index af61cefcf4..e0ad602819 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -169,31 +169,25 @@ namespace drawinglayer
if(!basegfx::fTools::equal(aScale.getX(), aScale.getY()))
{
- // #i96581# font stretching is needed; examine how big the difference between X and Y scaling is
- const double fPercent(fabs(1.0 - (aScale.getX() / aScale.getY())));
- static double fMaximumAcceptedPercent(0.05);
- static bool bForceAdaption(false);
-
- if(bForceAdaption || fPercent > fMaximumAcceptedPercent)
+ // #100424# We have a hint on FontScaling here. To decide a look
+ // at the pure font's scale is needed, since e.g. SC uses unequally scaled
+ // MapModes (was: #i96581#, but use available full precision from primitive
+ // now). aTranslate and fShearX can be reused since no longer needed.
+ basegfx::B2DVector aFontScale;
+ double fFontRotate;
+ rTextCandidate.getTextTransform().decompose(aFontScale, aTranslate, fFontRotate, fShearX);
+
+ if(!basegfx::fTools::equal(aFontScale.getX(), aFontScale.getY()))
{
- // #i96581# Need to adapt to a FontStretching bigger than acceptable maximum.
- // Get font's real width using FontMetric and adapt font to stretched
- // font
- const FontMetric aFontMetric(mpOutputDevice->GetFontMetric(aFont));
- const double fRealFontWidth(aFontMetric.GetWidth());
-
+ // indeed a FontScaling. Set at Font. Use the combined scale
+ // and rotate here
aFont = primitive2d::getVclFontFromFontAttributes(
rTextCandidate.getFontAttributes(),
- fRealFontWidth,
+ aScale.getX(),
aScale.getY(),
fRotate,
*mpOutputDevice);
}
- else
- {
- // #i96581# less than allowed maximum (probably SC's generated MapModes). React
- // pragmatically by ignoring the stretching up to this point
- }
}
// handle additional font attributes