]> git.saurik.com Git - wxWidgets.git/commitdiff
Give font 12pt size if none is given in pango string.
authorRobert Roebling <robert@roebling.de>
Fri, 20 Feb 2004 22:30:17 +0000 (22:30 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 20 Feb 2004 22:30:17 +0000 (22:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/font.cpp
src/gtk1/font.cpp

index eef97f198b6735ff8e99a500af5868ee8cf8e371..cdaa71a813b177455153a3e9b85b438ead3d40dc 100644 (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 ))
index eef97f198b6735ff8e99a500af5868ee8cf8e371..cdaa71a813b177455153a3e9b85b438ead3d40dc 100644 (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 ))