Merged wxRichTextAttr and wxTextAttrEx into wxTextAttr, and added a font table
to wxRichTextBuffer to reduce wxFont consumption and increase performance. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2410,9 +2410,12 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
|
||||
// the real height in twips and not the negative number which
|
||||
// wxFillLogFont() returns (this is correct in general and works with
|
||||
// the Windows font mapper, but not here)
|
||||
|
||||
wxFont font(style.GetFont());
|
||||
|
||||
LOGFONT lf;
|
||||
wxFillLogFont(&lf, &style.GetFont());
|
||||
cf.yHeight = 20*style.GetFont().GetPointSize(); // 1 pt = 20 twips
|
||||
wxFillLogFont(&lf, &font);
|
||||
cf.yHeight = 20*font.GetPointSize(); // 1 pt = 20 twips
|
||||
cf.bCharSet = lf.lfCharSet;
|
||||
cf.bPitchAndFamily = lf.lfPitchAndFamily;
|
||||
wxStrncpy( cf.szFaceName, lf.lfFaceName, WXSIZEOF(cf.szFaceName) );
|
||||
|
Reference in New Issue
Block a user