X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/05c9ccbe622515f0c32c996a95e86a316b13a59b..5c840e5ba4254d45747d21f92ab7710e4c136b48:/src/mgl/fontutil.cpp diff --git a/src/mgl/fontutil.cpp b/src/mgl/fontutil.cpp index ff86adca53..7900bda0ec 100644 --- a/src/mgl/fontutil.cpp +++ b/src/mgl/fontutil.cpp @@ -4,12 +4,12 @@ // Author: Vaclav Slavik // Created: 2001/04/29 // RCS-ID: $Id$ -// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) -// Licence: wxWindows license +// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "fontutil.h" #endif @@ -20,14 +20,12 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP - #include "wx/log.h" - #include "wx/fontutil.h" - #include "wx/fontmap.h" - #include "wx/tokenzr.h" - #include "wx/hash.h" -#endif // PCH - +#include "wx/log.h" +#include "wx/fontutil.h" +#include "wx/encinfo.h" +#include "wx/fontmap.h" +#include "wx/tokenzr.h" +#include "wx/hash.h" #include "wx/listimpl.cpp" #include "wx/sysopt.h" @@ -189,8 +187,10 @@ wxMGLFontInstance::~wxMGLFontInstance() MGL_unloadFontInstance(m_font); } -wxMGLFontLibrary::wxMGLFontLibrary(const wxString& filename, int type) +wxMGLFontLibrary::wxMGLFontLibrary(const wxString& filename, int type, + wxMGLFontFamily *parentFamily) { + m_family = parentFamily; m_type = type; m_fileName = filename; m_refs = 0; @@ -299,25 +299,25 @@ wxMGLFontFamily::wxMGLFontFamily(const font_info_t *info) m_fontLibs[wxFONTFACE_REGULAR] = NULL; else m_fontLibs[wxFONTFACE_REGULAR] = - new wxMGLFontLibrary(info->regularFace, wxFONTFACE_REGULAR); + new wxMGLFontLibrary(info->regularFace, wxFONTFACE_REGULAR, this); if ( info->italicFace[0] == '\0' ) m_fontLibs[wxFONTFACE_ITALIC] = NULL; else m_fontLibs[wxFONTFACE_ITALIC] = - new wxMGLFontLibrary(info->italicFace, wxFONTFACE_ITALIC); + new wxMGLFontLibrary(info->italicFace, wxFONTFACE_ITALIC, this); if ( info->boldFace[0] == '\0' ) m_fontLibs[wxFONTFACE_BOLD] = NULL; else m_fontLibs[wxFONTFACE_BOLD] = - new wxMGLFontLibrary(info->boldFace, wxFONTFACE_BOLD); + new wxMGLFontLibrary(info->boldFace, wxFONTFACE_BOLD, this); if ( info->boldItalicFace[0] == '\0' ) m_fontLibs[wxFONTFACE_BOLD_ITALIC] = NULL; else m_fontLibs[wxFONTFACE_BOLD_ITALIC] = - new wxMGLFontLibrary(info->boldItalicFace, wxFONTFACE_BOLD_ITALIC); + new wxMGLFontLibrary(info->boldItalicFace, wxFONTFACE_BOLD_ITALIC, this); wxLogTrace("mgl_font", "new family '%s' (r=%s, i=%s, b=%s, bi=%s)\n", info->familyName, info->regularFace, info->italicFace, @@ -414,7 +414,7 @@ wxMGLFontLibrary *wxFontsManager::GetFontLibrary(wxFont *font) return family->GetLibrary(type); } -static ibool enum_callback(const font_info_t *info, void *cookie) +static ibool MGLAPI enum_callback(const font_info_t *info, void *cookie) { wxFontsManager *db = (wxFontsManager*)cookie; db->AddFamily(info);