diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 0aa7b8ab59..f9080e1160 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -563,13 +563,10 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const // bounding box will be moved later according to the actual text options wxSize textsize = wxSize( extents.x, extents.y ); VECTOR2I pos = drawPos; + int fudgeFactor = extents.y * 0.17; if( font->IsStroke() ) - { - int fudgeFactor = extents.y * 0.17; textsize.y += fudgeFactor; - pos.y += fudgeFactor / 2; - } if( IsMultilineAllowed() && aLine > 0 && aLine < (int) strings.GetCount() ) pos.y -= KiROUND( aLine * font->GetInterline( fontSize.y ) ); @@ -627,6 +624,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const switch( GetVertJustify() ) { case GR_TEXT_V_ALIGN_TOP: + bbox.Offset( 0, -fudgeFactor ); break; case GR_TEXT_V_ALIGN_CENTER: @@ -635,6 +633,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const case GR_TEXT_V_ALIGN_BOTTOM: bbox.SetY( bbox.GetY() - bbox.GetHeight() ); + bbox.Offset( 0, fudgeFactor ); break; } diff --git a/common/font/font.cpp b/common/font/font.cpp index 9b5028bd5d..ff4ec41af1 100644 --- a/common/font/font.cpp +++ b/common/font/font.cpp @@ -347,7 +347,7 @@ VECTOR2I FONT::StringBoundaryLimits( const wxString& aText, const VECTOR2I& aSiz if( IsStroke() ) { // Inflate by a bit more than thickness/2 to catch diacriticals, descenders, etc. - boundingBox.Inflate( KiROUND( aThickness * 1.25 ) ); + boundingBox.Inflate( KiROUND( aThickness * 1.5 ) ); } else if( IsOutline() ) {