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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user