If setting the font by name doesn't work, set it by family. Fixes a crash under 10.4 since the mini doesn't have Tahoma.

Originally committed to SVN as r4027.
This commit is contained in:
Amar Takhar 2010-01-21 04:40:47 +00:00
parent 7e8b72a63f
commit a0b7561349
1 changed files with 3 additions and 1 deletions

View File

@ -89,8 +89,10 @@ void BaseGrid::UpdateStyle() {
wxString fontname = Options.AsText(_T("Grid Font Face"));
if (fontname.IsEmpty()) fontname = _T("Tahoma");
font.SetFaceName(fontname);
font.SetPointSize(Options.AsInt(_T("Grid font size")));
if (!font.IsOk())
font.SetFamily(wxFONTFAMILY_SWISS );
font.SetWeight(wxFONTWEIGHT_NORMAL);
font.SetPointSize(Options.AsInt(_T("Grid font size")));
// Set line height
{