Take text height into account as well as thickness for knockout margin.

Also centralizes calculation so all clients will get the same answer.

Fixes https://gitlab.com/kicad/code/kicad/issues/11636
This commit is contained in:
Jeff Young
2022-05-20 12:29:01 +01:00
parent e54ba87895
commit fa11e1c097
5 changed files with 33 additions and 33 deletions
+2 -1
View File
@@ -825,7 +825,8 @@ void BRDITEMS_PLOTTER::PlotPcbText( const EDA_TEXT* aText, PCB_LAYER_ID aLayer,
font->Draw( &callback_gal, shownText, aText->GetDrawPos(), attrs );
SHAPE_POLY_SET finalPoly;
int margin = attrs.m_StrokeWidth * 1.5;
int margin = attrs.m_StrokeWidth * 1.5
+ GetKnockoutTextMargin( attrs.m_Size, attrs.m_StrokeWidth );
aText->TransformBoundingBoxWithClearanceToPolygon( &finalPoly, margin );
finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST );