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:
@@ -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 ))
|
||||
{
|
||||
|
@@ -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 ))
|
||||
{
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user