EAGLE plugin: use specified RATIO value for text size calculation

This commit is contained in:
Steffen Mauch 2022-02-01 17:58:09 +00:00 committed by Seth Hillbrand
parent e560e765e6
commit 61b2b0ff0c
1 changed files with 4 additions and 4 deletions

View File

@ -1572,6 +1572,10 @@ void EAGLE_PLUGIN::orientFPText( FOOTPRINT* aFootprint, const EELEMENT& e, FP_TE
// Even though size and ratio are both optional, I am not seeing
// a case where ratio is present but size is not.
double ratio = 8;
if( a.ratio )
ratio = *a.ratio;
wxSize fontz = aFPText->GetTextSize();
int textThickness = KiROUND( fontz.y * ratio / 100 );
@ -1580,13 +1584,9 @@ void EAGLE_PLUGIN::orientFPText( FOOTPRINT* aFootprint, const EELEMENT& e, FP_TE
{
fontz = kicad_fontz( *a.size, textThickness );
aFPText->SetTextSize( fontz );
if( a.ratio )
ratio = *a.ratio;
}
int align = ETEXT::BOTTOM_LEFT; // bottom-left is eagle default
if( a.align )