EAGLE plugin: use specified RATIO value for text size calculation
(cherry picked from commit 61b2b0ff0c
)
This commit is contained in:
parent
a7fbdfe918
commit
169881dcf1
|
@ -1568,6 +1568,10 @@ void EAGLE_PLUGIN::orientFPText( FOOTPRINT* aFootprint, const EELEMENT& e, FP_TE
|
||||||
// Even though size and ratio are both optional, I am not seeing
|
// Even though size and ratio are both optional, I am not seeing
|
||||||
// a case where ratio is present but size is not.
|
// a case where ratio is present but size is not.
|
||||||
double ratio = 8;
|
double ratio = 8;
|
||||||
|
|
||||||
|
if( a.ratio )
|
||||||
|
ratio = *a.ratio;
|
||||||
|
|
||||||
wxSize fontz = aFPText->GetTextSize();
|
wxSize fontz = aFPText->GetTextSize();
|
||||||
int textThickness = KiROUND( fontz.y * ratio / 100 );
|
int textThickness = KiROUND( fontz.y * ratio / 100 );
|
||||||
|
|
||||||
|
@ -1576,13 +1580,9 @@ void EAGLE_PLUGIN::orientFPText( FOOTPRINT* aFootprint, const EELEMENT& e, FP_TE
|
||||||
{
|
{
|
||||||
fontz = kicad_fontz( *a.size, textThickness );
|
fontz = kicad_fontz( *a.size, textThickness );
|
||||||
aFPText->SetTextSize( fontz );
|
aFPText->SetTextSize( fontz );
|
||||||
|
|
||||||
if( a.ratio )
|
|
||||||
ratio = *a.ratio;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int align = ETEXT::BOTTOM_LEFT; // bottom-left is eagle default
|
int align = ETEXT::BOTTOM_LEFT; // bottom-left is eagle default
|
||||||
|
|
||||||
if( a.align )
|
if( a.align )
|
||||||
|
|
Loading…
Reference in New Issue