From d6a86fa9e0e0307f1571a520a64bff260bfa6cb8 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 3 Feb 2022 23:12:34 +0000 Subject: [PATCH] Don't double-count the text thickness in its polygon shape. The stroke font already takes the thickness into account in ComputeStringBoundaryLimits() (which is called by GetTextBox()). --- common/eda_text.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 51aa0dbbd0..1803dba4b3 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -685,21 +685,7 @@ void EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( SHAPE_POLY_SET* aCorn EDA_RECT rect = GetTextBox(); - // This ugly hack is because this code used to be defined in the board polygon code - // file rather than in the EDA_TEXT source file where it belonged. Using the board - // default text width was dubious so this recreates the same code with the exception - // if for some reason a different default text width is require for some other object. -#if !defined( DEFAULT_TEXT_WIDTH ) -#define LOCAL_DEFAULT_TEXT_WIDTH -#define DEFAULT_TEXT_WIDTH 0.15 -#endif - - rect.Inflate( aClearanceValue + Millimeter2iu( DEFAULT_TEXT_WIDTH ) ); - -#if defined( LOCAL_DEFAULT_TEXT_WIDTH ) -#undef DEFAULT_TEXT_WIDTH -#undef LOCAL_DEFAULT_TEXT_WIDTH -#endif + rect.Inflate( aClearanceValue ); corners[0].x = rect.GetOrigin().x; corners[0].y = rect.GetOrigin().y;