From d37526ba426be223cd94849f383b5c1d247a8ee7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 25 Oct 2022 11:56:47 +0100 Subject: [PATCH] Don't stroke outline font polygons, even with a really narrow pen. Fixes https://gitlab.com/kicad/code/kicad/issues/12739 --- common/plotters/PDF_plotter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index 5c20856c74..744c040c7c 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -416,8 +416,13 @@ void PDF_PLOTTER::PlotPoly( const std::vector& aCornerList, FILL_T aFi fprintf( m_workFile, "%g %g l\n", pos.x, pos.y ); } - // Close path and stroke(/fill) - fprintf( m_workFile, "%c\n", aFill == FILL_T::NO_FILL ? 'S' : 'b' ); + // Close path and stroke and/or fill + if( aFill == FILL_T::NO_FILL ) + fputs( "S\n", m_workFile ); + else if( aWidth == 0 ) + fputs( "f\n", m_workFile ); + else + fputs( "b\n", m_workFile ); }