Applied pango font patch for X11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1670,13 +1670,11 @@ wxCoord wxWindowDC::GetCharWidth() const
|
|||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
PangoLayout *layout = pango_layout_new( m_context );
|
PangoLayout *layout = pango_layout_new( m_context );
|
||||||
|
|
||||||
if (!m_fontdesc)
|
if (m_fontdesc)
|
||||||
{
|
pango_layout_set_font_description(layout, m_fontdesc);
|
||||||
char *crash = NULL;
|
else
|
||||||
*crash = 0;
|
pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
|
||||||
}
|
|
||||||
|
|
||||||
pango_layout_set_font_description(layout, m_fontdesc);
|
|
||||||
pango_layout_set_text(layout, "H", 1 );
|
pango_layout_set_text(layout, "H", 1 );
|
||||||
int w,h;
|
int w,h;
|
||||||
pango_layout_get_pixel_size(layout, &w, &h);
|
pango_layout_get_pixel_size(layout, &w, &h);
|
||||||
@@ -1706,13 +1704,10 @@ wxCoord wxWindowDC::GetCharHeight() const
|
|||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
PangoLayout *layout = pango_layout_new( m_context );
|
PangoLayout *layout = pango_layout_new( m_context );
|
||||||
|
|
||||||
if (!m_fontdesc)
|
if (m_fontdesc)
|
||||||
{
|
pango_layout_set_font_description(layout, m_fontdesc);
|
||||||
char *crash = NULL;
|
else
|
||||||
*crash = 0;
|
pango_layout_set_font_description(layout, this->GetFont().GetNativeFontInfo()->description);
|
||||||
}
|
|
||||||
|
|
||||||
pango_layout_set_font_description(layout, m_fontdesc);
|
|
||||||
|
|
||||||
pango_layout_set_text(layout, "H", 1 );
|
pango_layout_set_text(layout, "H", 1 );
|
||||||
int w,h;
|
int w,h;
|
||||||
@@ -1772,14 +1767,10 @@ void wxWindowDC::SetFont( const wxFont &font )
|
|||||||
|
|
||||||
m_font = font;
|
m_font = font;
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
return;
|
||||||
if (m_font.Ok())
|
|
||||||
{
|
|
||||||
if (m_fontdesc)
|
|
||||||
pango_font_description_free( m_fontdesc );
|
|
||||||
|
|
||||||
m_fontdesc = pango_font_description_copy( m_font.GetNativeFontInfo()->description );
|
#if wxUSE_UNICODE
|
||||||
}
|
m_fontdesc = font.GetNativeFontInfo()->description;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user