else
{
PangoFontFamily **families;
- PangoFontFamily *family;
+ PangoFontFamily *family = NULL;
int n_families;
pango_context_list_families(
#ifdef __WXGTK20__
//BCI: Cache the wxFontFamily inside the class. Validate cache with
//BCI: g_ascii_strcasecmp(pango_font_description_get_family(description), pango_font_family_get_name(family)) == 0
- if (pango_font_family_is_monospace( family ))
+ if (family != NULL && pango_font_family_is_monospace( family ))
ret = wxFONTFAMILY_TELETYPE; // is deemed a monospace font by pango
}
#endif // pango_font_family_is_monospace
}
-void wxNativeFontInfo::SetPointSize(int WXUNUSED(pointsize))
+void wxNativeFontInfo::SetPointSize(int pointsize)
{
- wxFAIL_MSG( _T("not implemented") );
+ pango_font_description_set_size( description, pointsize * PANGO_SCALE );
}
void wxNativeFontInfo::SetStyle(wxFontStyle style)
wxFAIL_MSG( _T("not implemented") );
}
-void wxNativeFontInfo::SetFaceName(wxString WXUNUSED(facename))
+void wxNativeFontInfo::SetFaceName(wxString facename)
{
- wxFAIL_MSG( _T("not implemented") );
+ pango_font_description_set_family( description, wxGTK_CONV(facename) );
}
void wxNativeFontInfo::SetFamily(wxFontFamily WXUNUSED(family))