From a4509bd4b33ee63093641df67cc96facdda663f9 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 28 Nov 2018 08:21:58 +1000 Subject: [PATCH] [layouts] Respect project text format when exporting TODO - show a dialog at export time allowing users to control the PDF export settings for individual exports, just like what we do for SVG exports --- src/app/layout/qgslayoutdesignerdialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/layout/qgslayoutdesignerdialog.cpp b/src/app/layout/qgslayoutdesignerdialog.cpp index d5591706bf8..67b24158b53 100644 --- a/src/app/layout/qgslayoutdesignerdialog.cpp +++ b/src/app/layout/qgslayoutdesignerdialog.cpp @@ -2070,6 +2070,7 @@ void QgsLayoutDesignerDialog::exportToPdf() QgsLayoutExporter::PdfExportSettings pdfSettings; pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool(); pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool(); + pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat(); // force a refresh, to e.g. update data defined properties, tables, etc mLayout->refresh(); @@ -2968,6 +2969,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf() QgsLayoutExporter::PdfExportSettings pdfSettings; pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool(); pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool(); + pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat(); QString error; std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >(); @@ -3349,8 +3351,10 @@ void QgsLayoutDesignerDialog::exportReportToPdf() forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool(); } QgsLayoutExporter::PdfExportSettings pdfSettings; + // TODO - show a dialog allowing users to control these settings on a per-output basis pdfSettings.rasterizeWholeImage = rasterize; pdfSettings.forceVectorOutput = forceVectorOutput; + pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat(); QString error; std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >();