summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2019-07-01 02:50:13 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-07-01 02:59:05 +0200
commit562275d798ea31303efa3844c4c611a248c5de92 (patch)
tree68ec0f5ee2a7b4e923bcf62ea2a2d45ffa58e0c2
parent774a0185fb470c55ff5ab9e4a4a7c31dff14cf0b (diff)
Fixup checkbox font export
Conflicts: vcl/source/gdi/pdfwriter_impl.cxx Change-Id: Ia451e99003f533dec72cf3309fd843ba0f3f1ed7
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index fc734dc27d11..a14f64d54ed5 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4391,7 +4391,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
// reasons require even the standard PS fonts to be embedded!
getReferenceDevice()->Push();
getReferenceDevice()->SetFont(
- Font( OUString( "OpenSymbol" ), Size( 0, 500 ) ) );
+ Font( OUString( "OpenSymbol" ), aFont.GetFontSize() ) );
getReferenceDevice()->ImplNewFont();
FontCharMapRef pMap;
getReferenceDevice()->GetFontCharMap(pMap);
@@ -4401,7 +4401,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
// make sure OpenSymbol is embedded, and includes our checkmark
const sal_Unicode cMark=0x2713;
- const GlyphItem aItem(pMap->GetGlyphIndex(cMark), 0, 0,
+ const GlyphItem aItem(0, 0, pMap->GetGlyphIndex(cMark),
Point(), 0, 0, 0);
const std::vector<sal_Ucs> aCodeUnits={ cMark };
sal_uInt8 nMappedGlyph;
@@ -4425,10 +4425,10 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
rBox.m_aRect = aCheckRect;
// create appearance streams
- sal_Int32 nCharXOffset = 1000;
+ sal_Int32 nCharXOffset = 1000 - 787; // metrics from OpenSymbol
nCharXOffset *= aCheckRect.GetHeight();
nCharXOffset /= 2000;
- sal_Int32 nCharYOffset = 1000-(820-143); // metrics from Zapf
+ sal_Int32 nCharYOffset = 1000 - (820-143); // metrics from Zapf
nCharYOffset *= aCheckRect.GetHeight();
nCharYOffset /= 2000;