Aplied patch [ 816113 ] Inconsistent GetCharWidth over platforms

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2003-12-11 09:05:48 +00:00
parent ddc4f3b528
commit 95c430aa2e
4 changed files with 6 additions and 6 deletions

View File

@ -3371,7 +3371,7 @@ int wxWindowGTK::GetCharWidth() const
PangoFontDescription *desc = m_font.GetNativeFontInfo()->description;
PangoLayout *layout = pango_layout_new(context);
pango_layout_set_font_description(layout, desc);
pango_layout_set_text(layout, "H", 1);
pango_layout_set_text(layout, "g", 1);
PangoLayoutLine *line = (PangoLayoutLine *)pango_layout_get_lines(layout)->data;
PangoRectangle rect;
@ -3383,7 +3383,7 @@ int wxWindowGTK::GetCharWidth() const
#else
GdkFont *font = m_font.GetInternalFont( 1.0 );
return gdk_string_width( font, "H" );
return gdk_string_width( font, "g" );
#endif
}

View File

@ -3371,7 +3371,7 @@ int wxWindowGTK::GetCharWidth() const
PangoFontDescription *desc = m_font.GetNativeFontInfo()->description;
PangoLayout *layout = pango_layout_new(context);
pango_layout_set_font_description(layout, desc);
pango_layout_set_text(layout, "H", 1);
pango_layout_set_text(layout, "g", 1);
PangoLayoutLine *line = (PangoLayoutLine *)pango_layout_get_lines(layout)->data;
PangoRectangle rect;
@ -3383,7 +3383,7 @@ int wxWindowGTK::GetCharWidth() const
#else
GdkFont *font = m_font.GetInternalFont( 1.0 );
return gdk_string_width( font, "H" );
return gdk_string_width( font, "g" );
#endif
}

View File

@ -1679,7 +1679,7 @@ wxCoord wxDC::GetCharWidth(void) const
if ( UMAGetSystemVersion() < 0x1000 || ((wxFont*)&m_font)->GetNoAntiAliasing() )
useGetThemeText = false ;
#endif
char text[] = "H" ;
char text[] = "g" ;
#if TARGET_CARBON
if ( useGetThemeText )
{

View File

@ -1679,7 +1679,7 @@ wxCoord wxDC::GetCharWidth(void) const
if ( UMAGetSystemVersion() < 0x1000 || ((wxFont*)&m_font)->GetNoAntiAliasing() )
useGetThemeText = false ;
#endif
char text[] = "H" ;
char text[] = "g" ;
#if TARGET_CARBON
if ( useGetThemeText )
{