From b77068aac339cc3d40dc44f6ad6ffe412e5e78d1 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 23 Mar 2026 20:13:22 +0200 Subject: [PATCH] Simplify code fSkewA is always 0.0 now, and fSkewB is always set to fSkew. Change-Id: I57e8a4a5cdde59cb78a7034bfc0d693740b1f672 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202513 Reviewed-by: Khaled Hosny Tested-by: Jenkins --- vcl/source/pdf/pdfwriter_impl.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/vcl/source/pdf/pdfwriter_impl.cxx b/vcl/source/pdf/pdfwriter_impl.cxx index d11a659430c3..3949856d2a03 100644 --- a/vcl/source/pdf/pdfwriter_impl.cxx +++ b/vcl/source/pdf/pdfwriter_impl.cxx @@ -5696,22 +5696,12 @@ void PDFWriterImpl::drawVerticalGlyphs( double fYScale = 1.0; double fTempXScale = fXScale; - // perform artificial italics if necessary - double fSkew = 0.0; - if (rGlyphs[i].m_pFont->NeedsArtificialItalic()) - fSkew = ARTIFICIAL_ITALIC_SKEW; - - double fSkewB = fSkew; - double fSkewA = 0.0; - Point aDeltaPos; if (rGlyphs[i].m_pGlyph->IsVertical()) { fDeltaAngle = M_PI/2.0; fYScale = fXScale; fTempXScale = 1.0; - fSkewA = 0.0; - fSkewB = fSkew; } aDeltaPos += SubPixelToLogic(basegfx::B2DPoint(nXOffset / fXScale, 0)) - SubPixelToLogic(basegfx::B2DPoint()); if( i < rGlyphs.size()-1 ) @@ -5727,8 +5717,9 @@ void PDFWriterImpl::drawVerticalGlyphs( aDeltaPos = rRotScale.transform( aDeltaPos ); Matrix3 aMat; - if( fSkewB != 0.0 || fSkewA != 0.0 ) - aMat.skew( fSkewA, fSkewB ); + // perform artificial italics if necessary + if (rGlyphs[i].m_pFont->NeedsArtificialItalic()) + aMat.skew(0.0, ARTIFICIAL_ITALIC_SKEW); aMat.scale( fTempXScale, fYScale ); aMat.rotate( fAngle+fDeltaAngle ); aMat.translate( aCurPos.X()+aDeltaPos.X(), aCurPos.Y()+aDeltaPos.Y() );