Skip to content

Commit 2ad1b66

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 (cherry picked from commit 062e6db)
1 parent 588a5a7 commit 2ad1b66

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
@@ -2072,6 +2072,7 @@ void QgsLayoutDesignerDialog::exportToPdf()
20722072
QgsLayoutExporter::PdfExportSettings pdfSettings;
20732073
pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool();
20742074
pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
2075+
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();
20752076

20762077
// force a refresh, to e.g. update data defined properties, tables, etc
20772078
mLayout->refresh();
@@ -2970,6 +2971,7 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
29702971
QgsLayoutExporter::PdfExportSettings pdfSettings;
29712972
pdfSettings.rasterizeWholeImage = mLayout->customProperty( QStringLiteral( "rasterize" ), false ).toBool();
29722973
pdfSettings.forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
2974+
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();
29732975

29742976
QString error;
29752977
std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >();
@@ -3351,8 +3353,10 @@ void QgsLayoutDesignerDialog::exportReportToPdf()
33513353
forceVectorOutput = mLayout->customProperty( QStringLiteral( "forceVector" ), false ).toBool();
33523354
}
33533355
QgsLayoutExporter::PdfExportSettings pdfSettings;
3356+
// TODO - show a dialog allowing users to control these settings on a per-output basis
33543357
pdfSettings.rasterizeWholeImage = rasterize;
33553358
pdfSettings.forceVectorOutput = forceVectorOutput;
3359+
pdfSettings.textRenderFormat = mLayout->project()->labelingEngineSettings().defaultTextRenderFormat();
33563360

33573361
QString error;
33583362
std::unique_ptr< QgsFeedback > feedback = qgis::make_unique< QgsFeedback >();

0 commit comments

Comments
 (0)