/////////////////////////////////////////////////////////////////////////////
-// Name: src/cocoa/font.cpp
+// Name: src/cocoa/font.mm
// Purpose: wxFont class
// Author: AUTHOR
// Modified by:
and a particular set of attributes. Furthermore, the attributes instead of
being flags as in NSFontManager are instead well-defined keys in a dictionary.
- The only way to get that behavior without NSFontManager is to pare down the
+ The only way to get that behaviour without NSFontManager is to pare down the
list as much as possible using the classic NSFontManager methods and then
to instantiate each font in the list and match on each font's afmDictionary.
wxNativeFontInfo so anyone who subclassed it or created one without going through
wxFont should expect what they get (i.e. horrible breakage)
There's a concern that wxFontRefData was in the public header when 2.8 shipped so
- it's possible that someone did subclass it to get better font behavior.
+ it's possible that someone did subclass it to get better font behaviour.
For right now, the plan is to write it strictly ABI compatible with 2.8 and eventually
to enhance it in trunk to accurately represent font attributes as Cocoa sees them.
//#include "_font_test_2_8_abi_compat.h"
-IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
-
static wxNativeFontInfo MakeNativeFontInfo(int size, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underlined, const wxString& faceName, wxFontEncoding encoding)
{
wxNativeFontInfo m_info; // NOTE: not an i-var despite name
int wxFont::GetPointSize() const
{
- wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), 0, wxT("invalid font") );
return M_FONTDATA->m_info.pointSize;
}
wxFontStyle wxFont::GetStyle() const
{
- wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), 0, wxT("invalid font") );
return M_FONTDATA->m_info.style;
}
-wxFontFamily wxFont::GetFamily() const
+wxFontFamily wxFont::DoGetFamily() const
{
- wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
return M_FONTDATA->m_info.family;
}
wxFontWeight wxFont::GetWeight() const
{
- wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), 0, wxT("invalid font") );
return M_FONTDATA->m_info.weight;
}
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
{
- wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), 0, wxT("invalid font") );
return &M_FONTDATA->m_info;
}