From 2205ca7463c2837c14e2953f327331873752c05d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 8 Oct 2009 22:38:10 +0000 Subject: [PATCH] Also support fonts in wxTextCtrl::GetStyle() in wxGTK. This extends the change of r62262 with support for the fonts. Closes #11281. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/textctrl.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index a29fc54183..8af511ffc7 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1717,7 +1717,14 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style) style.SetBackgroundColour(pattr->appearance.bg_color); style.SetTextColour(pattr->appearance.fg_color); - // TODO: set font, alignment, tabs and indents + const wxGtkString + pangoFontString(pango_font_description_to_string(pattr->font)); + + wxFont font; + if ( font.SetNativeFontInfo(wxString(pangoFontString)) ) + style.SetFont(font); + + // TODO: set alignment, tabs and indents } return true; -- 2.45.2