Browse Source

EAGLE plugin: use specified RATIO value for text size calculation

7.0
Steffen Mauch 4 years ago
committed by Seth Hillbrand
parent
commit
61b2b0ff0c
  1. 8
      pcbnew/plugins/eagle/eagle_plugin.cpp

8
pcbnew/plugins/eagle/eagle_plugin.cpp

@ -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 )

Loading…
Cancel
Save