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
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3474c94..9d4cd6c 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();