From 95c430aa2e4bd3808e6bf509b2df39895cf36b64 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 11 Dec 2003 09:05:48 +0000 Subject: [PATCH] Aplied patch [ 816113 ] Inconsistent GetCharWidth over platforms git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 4 ++-- src/gtk1/window.cpp | 4 ++-- src/mac/carbon/dc.cpp | 2 +- src/mac/dc.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index cf9d48a9f5..04f1e7da3c 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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 } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index cf9d48a9f5..04f1e7da3c 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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 } diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 126dea09aa..15bf719bd1 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -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 ) { diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index 126dea09aa..15bf719bd1 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -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 ) {