Give font 12pt size if none is given in pango string.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2004-02-20 22:30:17 +00:00
parent 47a3ff38a3
commit b6b579bd14
2 changed files with 10 additions and 0 deletions

View File

@@ -241,6 +241,11 @@ void wxFontRefData::InitFromNative()
// init fields
m_faceName = wxGTK_CONV_BACK( pango_font_description_get_family( desc ) );
// Pango sometimes needs to have a size
int pango_size = pango_font_description_get_size( desc );
if (pango_size == 0)
pango_font_description_set_size( desc, 12 * PANGO_SCALE);
m_pointSize = pango_font_description_get_size( desc ) / PANGO_SCALE;
switch (pango_font_description_get_style( desc ))