diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-06-24 18:01:04 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-06-24 18:53:11 +0000 |
commit | 306ed04b0ac9a166a0a16f0324384d541c7fc0cb (patch) | |
tree | d0d6044ab2e87e2425b1a11f9a6f972a5c40ff97 /vcl | |
parent | 112ce9b1dc1cbf34bb6378ff2e61dba6144782c9 (diff) |
fdo#66108 crash in PDF when using Helvetica font
When using Helvetica fonts with any character it supports outside Adobe
standard font encoding, PDF writer will force font fallback which we do
not support in Core Text and AquaSalGraphics will crash. With ATSUI we
do not crash, but no characters are output either.
This happens because PDF writer registers 14 “virtual” standard PDF
fonts, including Helvetica, and tries to use them if possible instead of
the real font.
Now the concept of standard fonts is obsolete, and Adobe now recommends
that all fonts are embedded in the PDF, so here I just disable that
mechanism when on Mac as a quick fix to avoid the crash, but eventually
this stuff should dropped entirely.
Change-Id: I3a4d8793d1d2124749372452ffa6ba3145dbd9cd
Reviewed-on: https://gerrit.libreoffice.org/4485
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index b8bd0bcb7b5c..c478dff5b5e2 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1723,7 +1723,11 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal m_nCurrentStructElement( 0 ), m_bEmitStructure( true ), m_bNewMCID( false ), +#ifdef MACOSX + m_bEmbedStandardFonts( true ), +#else m_bEmbedStandardFonts( false ), +#endif m_nNextFID( 1 ), m_nInheritedPageWidth( 595 ), // default A4 m_nInheritedPageHeight( 842 ), // default A4 @@ -1840,7 +1844,9 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal if( m_bIsPDF_A1 ) m_aContext.Version = PDFWriter::PDF_1_4; //meaning we need PDF 1.4, PDF/A flavour +#ifndef MACOSX m_bEmbedStandardFonts = m_aContext.EmbedStandardFonts; +#endif } PDFWriterImpl::~PDFWriterImpl() |