summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2024-05-18 17:23:19 +0300
committerAndras Timar <andras.timar@collabora.com>2024-06-03 14:31:32 +0200
commit544dfd9d85841262dca78d510b453eeab554f25f (patch)
tree619534b373679db9ac21b571013f1e32f98d507c /vcl
parent11074ab281dd911fa3e96eb89b57eb6b87794190 (diff)
tdf#160884: Apply scale to position of embedded images in Type 3 fonts
Regression from: commit bc3f6c3a47411a3b5dafadca4e5c55cd24e30662 Author: Khaled Hosny <khaled@libreoffice.org> Date: Tue Aug 22 10:47:33 2023 +0300 tdf#155610: Workaround Acrobat bug with Type 3 fonts and unusual UPEM Change-Id: I5e352292268d19fb8348a038d251f2d395a0be46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167830 Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Reviewed-by: خالد حسني <khaled@libreoffice.org> Tested-by: Jenkins (cherry picked from commit 44f2bc12779645bce1000289caf9c66804ecb14e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167815 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index ff7383d7be99..16b0b5e23501 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2746,15 +2746,11 @@ bool PDFWriterImpl::emitType3Font(const vcl::font::PhysicalFontFace* pFace,
appendDouble(aRect.GetWidth() * fScale, aContents);
aContents.append(" 0 0 ");
appendDouble(aRect.GetHeight() * fScale, aContents);
- aContents.append(
- + " "
- + OString::number(aRect.getX())
- + " "
- + OString::number(aRect.getY())
- + " cm "
- "/Im"
- + OString::number(nObject)
- + " Do Q\n");
+ aContents.append(" ");
+ appendDouble(aRect.getX() * fScale, aContents);
+ aContents.append(" ");
+ appendDouble(aRect.getY() * fScale, aContents);
+ aContents.append(" cm /Im" + OString::number(nObject) + " Do Q\n");
}
const auto& rOutline = rGlyph.getOutline();