Report errors if using private font fails in the font sample
Give more information instead of just silently not showing the corresponding menu item.
This commit is contained in:
parent
a7a59a263d
commit
4145a30e06
@ -422,8 +422,15 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
#endif
|
||||
privfont << "wxprivate.ttf";
|
||||
|
||||
if ( wxFont::AddPrivateFont(privfont) &&
|
||||
wxFont::ActivatePrivateFonts() )
|
||||
if ( !wxFont::AddPrivateFont(privfont) )
|
||||
{
|
||||
wxLogWarning("Failed to add private font from \"%s\"", privfont);
|
||||
}
|
||||
else if ( !wxFont::ActivatePrivateFonts() )
|
||||
{
|
||||
wxLogWarning("Failed to activate the private fonts");
|
||||
}
|
||||
else
|
||||
{
|
||||
menuSelect->AppendSeparator();
|
||||
menuSelect->Append(Font_Private,
|
||||
|
Loading…
Reference in New Issue
Block a user