From: Robin Dunn Date: Thu, 21 Apr 2005 20:29:59 +0000 (+0000) Subject: Use the encoding in StyleSetFont too. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/af0531a5a8d930312bfbdb7e9c0703f95ea0b55b Use the encoding in StyleSetFont too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index 1bd4e080d6..b003480d48 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -2524,14 +2524,14 @@ void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { int x, y; GetTextExtent(wxT("X"), &x, &y, NULL, NULL, &font); #endif - int size = font.GetPointSize(); - wxString faceName = font.GetFaceName(); - bool bold = font.GetWeight() == wxBOLD; - bool italic = font.GetStyle() != wxNORMAL; - bool under = font.GetUnderlined(); - - // TODO: add encoding/charset mapping - StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); + int size = font.GetPointSize(); + wxString faceName = font.GetFaceName(); + bool bold = font.GetWeight() == wxBOLD; + bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); + wxFontEncoding encoding = font.GetDefaultEncoding(); + + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under, encoding); } // Set all font style attributes at once. diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index 989a49401b..7735fd6109 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -296,14 +296,14 @@ void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { int x, y; GetTextExtent(wxT("X"), &x, &y, NULL, NULL, &font); #endif - int size = font.GetPointSize(); - wxString faceName = font.GetFaceName(); - bool bold = font.GetWeight() == wxBOLD; - bool italic = font.GetStyle() != wxNORMAL; - bool under = font.GetUnderlined(); - - // TODO: add encoding/charset mapping - StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); + int size = font.GetPointSize(); + wxString faceName = font.GetFaceName(); + bool bold = font.GetWeight() == wxBOLD; + bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); + wxFontEncoding encoding = font.GetDefaultEncoding(); + + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under, encoding); } // Set all font style attributes at once. diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 1bd4e080d6..b003480d48 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -2524,14 +2524,14 @@ void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { int x, y; GetTextExtent(wxT("X"), &x, &y, NULL, NULL, &font); #endif - int size = font.GetPointSize(); - wxString faceName = font.GetFaceName(); - bool bold = font.GetWeight() == wxBOLD; - bool italic = font.GetStyle() != wxNORMAL; - bool under = font.GetUnderlined(); - - // TODO: add encoding/charset mapping - StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); + int size = font.GetPointSize(); + wxString faceName = font.GetFaceName(); + bool bold = font.GetWeight() == wxBOLD; + bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); + wxFontEncoding encoding = font.GetDefaultEncoding(); + + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under, encoding); } // Set all font style attributes at once. diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 989a49401b..7735fd6109 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -296,14 +296,14 @@ void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { int x, y; GetTextExtent(wxT("X"), &x, &y, NULL, NULL, &font); #endif - int size = font.GetPointSize(); - wxString faceName = font.GetFaceName(); - bool bold = font.GetWeight() == wxBOLD; - bool italic = font.GetStyle() != wxNORMAL; - bool under = font.GetUnderlined(); - - // TODO: add encoding/charset mapping - StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); + int size = font.GetPointSize(); + wxString faceName = font.GetFaceName(); + bool bold = font.GetWeight() == wxBOLD; + bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); + wxFontEncoding encoding = font.GetDefaultEncoding(); + + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under, encoding); } // Set all font style attributes at once.