Skip to content

Commit a4509bd

Browse files
committedDec 11, 2018
[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
1 parent 7ed4218 commit a4509bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,6 +2070,7 @@ void QgsLayoutDesignerDialog::exportToPdf()
20702070
QgsLayoutExporter::PdfExportSettings pdfSettings;
20712071
pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool();
20722072
pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
2073+
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();
20732074

20742075
// force a refresh, to e.g. update data defined properties, tables, etc
20752076
mLayout->refresh();
@@ -2968,6 +2969,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
29682969
QgsLayoutExporter::PdfExportSettings pdfSettings;
29692970
pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool();
29702971
pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
2972+
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();
29712973

29722974
QString error;
29732975
std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >();
@@ -3349,8 +3351,10 @@ void QgsLayoutDesignerDialog::exportReportToPdf()
33493351
forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
33503352
}
33513353
QgsLayoutExporter::PdfExportSettings pdfSettings;
3354+
// TODO - show a dialog allowing users to control these settings on a per-output basis
33523355
pdfSettings.rasterizeWholeImage = rasterize;
33533356
pdfSettings.forceVectorOutput = forceVectorOutput;
3357+
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();
33543358

33553359
QString error;
33563360
std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >();

0 commit comments

Comments
 (0)
Please sign in to comment.