Use standard font for text on symbol

This commit is contained in:
Martin Dobias 2018-04-19 14:23:49 +02:00
parent 00d8dbfb47
commit f1a31d09f1
2 changed files with 4 additions and 0 deletions

View File

@ -809,6 +809,10 @@ void TestQgsLegendRenderer::testTextOnSymbol()
content["0"] = "Rd";
content["2"] = "Bl";
legend->setTextOnSymbolContent( content );
QgsTextFormat textFormat;
textFormat.setFont( QgsFontUtils::getStandardTestFont( QStringLiteral( "Roman" ) ) );
textFormat.setSize( 9 );
legend->setTextOnSymbolTextFormat( textFormat );
vl->setLegend( legend );
QgsLayerTree *root = new QgsLayerTree();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB