Increase bounding box of stroke text and the leader box of all text.
Fixes https://gitlab.com/kicad/code/kicad/issues/13009
This commit is contained in:
parent
70a038877e
commit
740e193871
|
@ -287,11 +287,11 @@ VECTOR2I FONT::StringBoundaryLimits( const wxString& aText, const VECTOR2I& aSiz
|
||||||
if( IsStroke() )
|
if( IsStroke() )
|
||||||
{
|
{
|
||||||
// Inflate by a bit more than thickness/2 to catch diacriticals, descenders, etc.
|
// Inflate by a bit more than thickness/2 to catch diacriticals, descenders, etc.
|
||||||
boundingBox.Inflate( KiROUND( aThickness * 0.75 ) );
|
boundingBox.Inflate( KiROUND( aThickness * 1.5 ) );
|
||||||
}
|
}
|
||||||
else if( IsOutline() )
|
else if( IsOutline() )
|
||||||
{
|
{
|
||||||
// Outline fonts have thickness built in
|
// Outline fonts have thickness built in, and *usually* stay within their ascent/descent
|
||||||
}
|
}
|
||||||
|
|
||||||
return boundingBox.GetSize();
|
return boundingBox.GetSize();
|
||||||
|
|
|
@ -997,7 +997,7 @@ void PCB_DIM_LEADER::updateGeometry()
|
||||||
// Now that we have the text updated, we can determine how to draw the second line
|
// Now that we have the text updated, we can determine how to draw the second line
|
||||||
// First we need to create an appropriate bounding polygon to collide with
|
// First we need to create an appropriate bounding polygon to collide with
|
||||||
BOX2I textBox = m_text.GetTextBox().Inflate( m_text.GetTextWidth() / 2,
|
BOX2I textBox = m_text.GetTextBox().Inflate( m_text.GetTextWidth() / 2,
|
||||||
m_text.GetEffectiveTextPenWidth() );
|
m_text.GetEffectiveTextPenWidth() * 1.8 );
|
||||||
|
|
||||||
SHAPE_POLY_SET polyBox;
|
SHAPE_POLY_SET polyBox;
|
||||||
polyBox.NewOutline();
|
polyBox.NewOutline();
|
||||||
|
|
Loading…
Reference in New Issue