-// ----------------------------------------------------------------------------
-// wxFontRefData
-// ----------------------------------------------------------------------------
-
-void wxFontRefData::Init(int pointSize,
- int family,
- int style,
- int weight,
- bool underlined,
- const wxString& faceName,
- wxFontEncoding encoding)
-{
- if ( family == wxDEFAULT )
- m_family = wxSWISS;
- else
- m_family = family;
-
- m_faceName = faceName;
-
- if ( style == wxDEFAULT )
- m_style = wxNORMAL;
- else
- m_style = style;
-
- if ( weight == wxDEFAULT )
- m_weight = wxNORMAL;
- else
- m_weight = weight;
-
- if ( pointSize == wxDEFAULT )
- m_pointSize = 12;
- else
- m_pointSize = pointSize;
-
- m_underlined = underlined;
- m_encoding = encoding;
-
- m_library = NULL;
- m_valid = FALSE;
-}
-
-wxFontRefData::wxFontRefData(const wxFontRefData& data)
-{
- Init(data.m_pointSize, data.m_family, data.m_style, data.m_weight,
- data.m_underlined, data.m_faceName, data.m_encoding);
-
- m_library = data.m_library;
- m_valid = data.m_valid;
- if ( m_library )
- m_library->IncRef();
- wxLogTrace("mgl_font", "created fntrefdata %p, library is %p", this, m_library);
-}
-
-wxFontRefData::wxFontRefData(int size, int family, int style,
- int weight, bool underlined,
- const wxString& faceName,
- wxFontEncoding encoding)
-{
- Init(size, family, style, weight, underlined, faceName, encoding);
- wxLogTrace("mgl_font", "created fntrefdata %p, library is %p", this, m_library);
-}
-
-wxFontRefData::~wxFontRefData()
-{
- wxLogTrace("mgl_font", "destructing fntrefdata %p, library is %p", this, m_library);
- if ( m_library )
- m_library->DecRef();
-}