diff --git a/eeschema/eeschema_jobs_handler.cpp b/eeschema/eeschema_jobs_handler.cpp index 3ce4da7dc5..8224ff7101 100644 --- a/eeschema/eeschema_jobs_handler.cpp +++ b/eeschema/eeschema_jobs_handler.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -261,7 +263,22 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob ) std::unique_ptr renderSettings = std::make_unique(); InitRenderSettings( renderSettings.get(), aPlotJob->m_theme, sch, aPlotJob->m_drawingSheet ); - renderSettings->SetDefaultFont( aPlotJob->m_defaultFont ); + + wxString font = aPlotJob->m_defaultFont; + + if( font.IsEmpty() ) + { + SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager(); + EESCHEMA_SETTINGS* cfg = + dynamic_cast( mgr.GetAppSettings( "eeschema" ) ); + + if( cfg ) + font = cfg->m_Appearance.default_font; + else + font = KICAD_FONT_NAME; + } + + renderSettings->SetDefaultFont( font ); renderSettings->SetMinPenWidth( aPlotJob->m_minPenWidth ); std::unique_ptr schPlotter = std::make_unique( sch ); diff --git a/kicad/cli/command_sch_export_plot.cpp b/kicad/cli/command_sch_export_plot.cpp index 7a8e88e60d..dc66bef6b9 100644 --- a/kicad/cli/command_sch_export_plot.cpp +++ b/kicad/cli/command_sch_export_plot.cpp @@ -80,7 +80,7 @@ CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND( const std::string& aName, m_argParser.add_argument( ARG_FONT_NAME ) .help( UTF8STDSTR( _( "Default font name" ) ) ) - .default_value( wxString( KICAD_FONT_NAME ).ToStdString() ); + .default_value( wxString( "" ).ToStdString() ); if( aPlotFormat == SCH_PLOT_FORMAT::PDF ) {