// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "font.h"
-#endif
-
#include "wx/wxprec.h"
#include "wx/string.h"
#include "wx/fontutil.h"
#include "wx/mac/private.h"
+#ifndef __DARWIN__
#include <ATSUnicode.h>
+#endif
-#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
-#endif
class WXDLLEXPORT wxFontRefData: public wxGDIRefData
{
, m_style(wxNORMAL)
, m_weight(wxNORMAL)
, m_underlined(FALSE)
- , m_faceName(wxT("Geneva"))
+ , m_faceName(wxT("applicationfont"))
, m_encoding(wxFONTENCODING_DEFAULT)
, m_macFontNum(0)
, m_macFontSize(0)
, m_macATSUStyle(0)
, m_macATSUFontID(0)
{
- Init(10, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE,
- wxT("Geneva"), wxFONTENCODING_DEFAULT);
+ Init(m_pointSize, m_family, m_style, m_weight,
+ m_underlined, m_faceName, m_encoding);
}
wxFontRefData(const wxFontRefData& data)
// ATSU Font Information
- // this is splitted into an ATSU font id that may
+ // this is split into an ATSU font id that may
// contain some styles (special bold fonts etc) and
// these are the additional qd styles that are not
// included in the ATSU font id
int wxFont::GetPointSize() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_pointSize;
}
int wxFont::GetFamily() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_family;
}
int wxFont::GetStyle() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_style;
}
int wxFont::GetWeight() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_weight;
}
bool wxFont::GetUnderlined() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}
bool wxFont::GetNoAntiAliasing() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") );
return M_FONTDATA->m_noAA;
}
short wxFont::MacGetFontNum() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_macFontNum;
}
short wxFont::MacGetFontSize() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_macFontSize;
}
wxByte wxFont::MacGetFontStyle() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_macFontStyle;
}
wxUint32 wxFont::MacGetATSUFontID() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_macATSUFontID;
}
wxUint32 wxFont::MacGetATSUAdditionalQDStyles() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_macATSUAdditionalQDStyles;
}
wxUint16 wxFont::MacGetThemeFontID() const
{
- wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
+ wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") );
return M_FONTDATA->m_macThemeFontID;
}