EAGLE plugin: use specified RATIO value for text size calculation
This commit is contained in:
parent
e560e765e6
commit
61b2b0ff0c
|
@ -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…
Reference in New Issue