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
|
#endif
|
||||||
privfont << "wxprivate.ttf";
|
privfont << "wxprivate.ttf";
|
||||||
|
|
||||||
if ( wxFont::AddPrivateFont(privfont) &&
|
if ( !wxFont::AddPrivateFont(privfont) )
|
||||||
wxFont::ActivatePrivateFonts() )
|
{
|
||||||
|
wxLogWarning("Failed to add private font from \"%s\"", privfont);
|
||||||
|
}
|
||||||
|
else if ( !wxFont::ActivatePrivateFonts() )
|
||||||
|
{
|
||||||
|
wxLogWarning("Failed to activate the private fonts");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
menuSelect->AppendSeparator();
|
menuSelect->AppendSeparator();
|
||||||
menuSelect->Append(Font_Private,
|
menuSelect->Append(Font_Private,
|
||||||
|
Loading…
Reference in New Issue
Block a user