pointer returned by GetNativeFontInfo() is now const and must not be deleted (replaces patch 810192)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -139,6 +139,28 @@ public:
|
||||
// reset to the default state
|
||||
void Init();
|
||||
|
||||
// init with the parameters of the given font
|
||||
void InitFromFont(const wxFont& font)
|
||||
{
|
||||
// translate all font parameters
|
||||
SetStyle((wxFontStyle)font.GetStyle());
|
||||
SetWeight((wxFontWeight)font.GetWeight());
|
||||
SetUnderlined(font.GetUnderlined());
|
||||
SetPointSize(font.GetPointSize());
|
||||
|
||||
// set the family/facename
|
||||
SetFamily((wxFontFamily)font.GetFamily());
|
||||
const wxString& facename = font.GetFaceName();
|
||||
if ( !facename.empty() )
|
||||
{
|
||||
SetFaceName(facename);
|
||||
}
|
||||
|
||||
// deal with encoding now (it may override the font family and facename
|
||||
// so do it after setting them)
|
||||
SetEncoding(font.GetEncoding());
|
||||
}
|
||||
|
||||
// accessors and modifiers for the font elements
|
||||
int GetPointSize() const;
|
||||
wxFontStyle GetStyle() const;
|
||||
|
Reference in New Issue
Block a user