int wxWindowX11::GetCharHeight() const
{
- wxCHECK_MSG( m_font.Ok(), 0, wxT("valid window font needed") );
+ wxFont font(GetFont());
+ wxCHECK_MSG( font.Ok(), 0, wxT("valid window font needed") );
#if wxUSE_UNICODE
// There should be an easier way.
PangoLayout *layout = pango_layout_new( wxTheApp->GetPangoContext() );
- pango_layout_set_font_description( layout, GetFont().GetNativeFontInfo()->description );
+ pango_layout_set_font_description( layout, font.GetNativeFontInfo()->description );
pango_layout_set_text(layout, "H", 1 );
int w,h;
pango_layout_get_pixel_size(layout, &w, &h);
return h;
#else
- WXFontStructPtr pFontStruct = m_font.GetFontStruct(1.0, wxGlobalDisplay());
+ WXFontStructPtr pFontStruct = font.GetFontStruct(1.0, wxGlobalDisplay());
int direction, ascent, descent;
XCharStruct overall;
int wxWindowX11::GetCharWidth() const
{
- wxCHECK_MSG( m_font.Ok(), 0, wxT("valid window font needed") );
+ wxFont font(GetFont());
+ wxCHECK_MSG( font.Ok(), 0, wxT("valid window font needed") );
#if wxUSE_UNICODE
// There should be an easier way.
PangoLayout *layout = pango_layout_new( wxTheApp->GetPangoContext() );
- pango_layout_set_font_description( layout, GetFont().GetNativeFontInfo()->description );
+ pango_layout_set_font_description( layout, font.GetNativeFontInfo()->description );
pango_layout_set_text(layout, "H", 1 );
int w,h;
pango_layout_get_pixel_size(layout, &w, &h);
return w;
#else
- WXFontStructPtr pFontStruct = m_font.GetFontStruct(1.0, wxGlobalDisplay());
+ WXFontStructPtr pFontStruct = font.GetFontStruct(1.0, wxGlobalDisplay());
int direction, ascent, descent;
XCharStruct overall;
int *descent, int *externalLeading,
const wxFont *theFont) const
{
- wxFont fontToUse = m_font;
+ wxFont fontToUse = GetFont();
if (theFont) fontToUse = *theFont;
wxCHECK_RET( fontToUse.Ok(), wxT("invalid font") );