altium: use correct text rotation, improve truetype text size

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4349
This commit is contained in:
Thomas Pointhuber 2020-05-10 17:27:29 +02:00 committed by Jon Evans
parent 0d3c1a23ad
commit 96da60d119
1 changed files with 11 additions and 1 deletions

View File

@ -2256,6 +2256,8 @@ void ALTIUM_PCB::ParseTexts6Data(
module->Add( txm, ADD_MODE::APPEND );
}
txm->SetKeepUpright( false );
tx = txm;
itm = txm;
}
@ -2304,7 +2306,15 @@ void ALTIUM_PCB::ParseTexts6Data(
}
itm->SetLayer( klayer );
tx->SetTextSize( wxSize( elem.height, elem.height ) ); // TODO: parse text width
if( elem.isTruetype )
{
// TODO: why is this required? Somehow, truetype size is calculated differently
tx->SetTextSize( wxSize( elem.height / 2, elem.height / 2 ) );
}
else
{
tx->SetTextSize( wxSize( elem.height, elem.height ) ); // TODO: parse text width
}
tx->SetTextThickness( elem.strokewidth );
tx->SetMirrored( elem.mirrored );
if( elem.isDesignator || elem.isComment ) // That's just a bold assumption