Native fonts now seem to require a font size.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2003-12-01 09:37:35 +00:00
parent c293cbbb18
commit 79bf5de2bb
3 changed files with 15 additions and 1 deletions

View File

@@ -232,8 +232,15 @@ 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;
// wxPrintf( wxT("face %s m_pointSize %d\n"), m_faceName.c_str(), m_pointSize );
switch (pango_font_description_get_style( desc ))
{

View File

@@ -232,8 +232,15 @@ 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;
// wxPrintf( wxT("face %s m_pointSize %d\n"), m_faceName.c_str(), m_pointSize );
switch (pango_font_description_get_style( desc ))
{

View File

@@ -139,7 +139,7 @@ bool wxNativeFontInfo::FromString( const wxString& str )
description = pango_font_description_from_string( wxGTK_CONV( str ) );
// wxPrintf( L"FromString result: %s\n", ToString().c_str() );
// wxPrintf( L"FromString before: %s result: %s\n", str.c_str(), ToString().c_str() );
return TRUE;
}