Font cleanup and bug fixes.
This commit is contained in:
parent
f379c49084
commit
76368af7b9
|
@ -661,7 +661,6 @@ void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset,
|
||||||
|
|
||||||
GetLinePositions( positions, strings.Count() );
|
GetLinePositions( positions, strings.Count() );
|
||||||
|
|
||||||
// FONT TODO: this is going to use the KiCad font because it doesn't know any better...
|
|
||||||
for( unsigned ii = 0; ii < strings.Count(); ii++ )
|
for( unsigned ii = 0; ii < strings.Count(); ii++ )
|
||||||
printOneLineOfText( aSettings, aOffset, aColor, aFillMode, strings[ii], positions[ii] );
|
printOneLineOfText( aSettings, aOffset, aColor, aFillMode, strings[ii], positions[ii] );
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ FONT* FONT::getDefaultFont()
|
||||||
|
|
||||||
FONT* FONT::GetFont( const wxString& aFontName, bool aBold, bool aItalic )
|
FONT* FONT::GetFont( const wxString& aFontName, bool aBold, bool aItalic )
|
||||||
{
|
{
|
||||||
if( aFontName.empty() || aFontName == wxT( "KiCad Font" ) )
|
if( aFontName.empty() || aFontName.StartsWith( wxT( "KiCad Font" ) ) )
|
||||||
return getDefaultFont();
|
return getDefaultFont();
|
||||||
|
|
||||||
std::tuple<wxString, bool, bool> key = { aFontName, aBold, aItalic };
|
std::tuple<wxString, bool, bool> key = { aFontName, aBold, aItalic };
|
||||||
|
|
|
@ -88,7 +88,7 @@ KIFONT::FONT* FONT_CHOICE::GetFontSelection( bool aBold, bool aItalic ) const
|
||||||
if( GetSelection() <= 0 )
|
if( GetSelection() <= 0 )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
else if( GetSelection() == 1 && m_systemFontCount == 2 )
|
else if( GetSelection() == 1 && m_systemFontCount == 2 )
|
||||||
return KIFONT::FONT::GetFont( "KiCad", aBold, aItalic );
|
return KIFONT::FONT::GetFont( "KiCad Font", aBold, aItalic );
|
||||||
else
|
else
|
||||||
return KIFONT::FONT::GetFont( GetStringSelection(), aBold, aItalic );
|
return KIFONT::FONT::GetFont( GetStringSelection(), aBold, aItalic );
|
||||||
}
|
}
|
||||||
|
|
|
@ -599,7 +599,6 @@ void SCH_SEXPR_PARSER::parseEDA_TEXT( EDA_TEXT* aText, bool aConvertOverbarSynta
|
||||||
|
|
||||||
if( !faceName.IsEmpty() )
|
if( !faceName.IsEmpty() )
|
||||||
{
|
{
|
||||||
// FONT TODO: notify user about missing font
|
|
||||||
aText->SetFont( KIFONT::FONT::GetFont( faceName, aText->IsBold(),
|
aText->SetFont( KIFONT::FONT::GetFont( faceName, aText->IsBold(),
|
||||||
aText->IsItalic() ) );
|
aText->IsItalic() ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,7 +474,6 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText )
|
||||||
|
|
||||||
if( !faceName.IsEmpty() )
|
if( !faceName.IsEmpty() )
|
||||||
{
|
{
|
||||||
// FONT TODO: notify user about missing font
|
|
||||||
aText->SetFont( KIFONT::FONT::GetFont( faceName, aText->IsBold(),
|
aText->SetFont( KIFONT::FONT::GetFont( faceName, aText->IsBold(),
|
||||||
aText->IsItalic() ) );
|
aText->IsItalic() ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue