X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4ffab299a1a214fbdd9e3941909323875b32e28..82baa5e4f1992b701e183544c935bcb424503f5b:/src/msw/font.cpp diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 296142c585..14b78ac9e6 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) wxWindows team +// Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -77,7 +77,7 @@ wxBEGIN_PROPERTIES_TABLE(wxFont) wxPROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontStyle wxPROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontWeight wxPROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxEND_PROPERTIES_TABLE() @@ -457,7 +457,7 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const void wxNativeFontInfo::SetPointSize(int pointsize) { #if wxFONT_SIZE_COMPATIBILITY - // Incorrect, but compatible with old wxWindows behaviour + // Incorrect, but compatible with old wxWidgets behaviour lf.lfHeight = (pointSize*ppInch)/72; #else // wxFONT_SIZE_COMPATIBILITY // FIXME: using the screen here results in incorrect font size calculation @@ -948,12 +948,10 @@ wxFontEncoding wxFont::GetEncoding() const return M_FONTDATA->GetEncoding(); } -wxNativeFontInfo *wxFont::GetNativeFontInfo() const +const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { - if ( M_FONTDATA->HasNativeFontInfo() ) - return new wxNativeFontInfo(M_FONTDATA->GetNativeFontInfo()); - - return 0; + return M_FONTDATA->HasNativeFontInfo() ? &(M_FONTDATA->GetNativeFontInfo()) + : NULL; } bool wxFont::IsFixedWidth() const