osx : use freetype instead of deprecated carbon api

This commit is contained in:
hymei
2022-02-23 20:06:43 +08:00
committed by nillerusr
parent 3291cdf978
commit df78eef85f
3 changed files with 10 additions and 13 deletions

View File

@@ -17,7 +17,7 @@
#include "filesystem.h"
#include "vguifont.h"
#ifdef LINUX
#if defined(LINUX) || defined(OSX)
#include <ft2build.h>
#include FT_FREETYPE_H
typedef void *(*FontDataHelper)( const char *pchFontName, int &size, const char *fontFileName );
@@ -71,7 +71,7 @@ public:
IFileSystem *FileSystem() { return m_pFileSystem; }
IMaterialSystem *MaterialSystem() { return m_pMaterialSystem; }
#ifdef LINUX
#if defined(LINUX) || defined(OSX)
FT_Library GetFontLibraryHandle() { return library; }
void SetFontDataHelper( FontDataHelper helper ) { m_pFontDataHelper = helper; }
#endif
@@ -96,7 +96,7 @@ private:
CUtlVector<CFontAmalgam> m_FontAmalgams;
CUtlVector<font_t *> m_Win32Fonts;
#ifdef LINUX
#if defined(LINUX) || defined(OSX)
FT_Library library;
FontDataHelper m_pFontDataHelper;
#endif

View File

@@ -23,10 +23,7 @@ struct newChar_t
#ifdef WIN32
#include "Win32Font.h"
typedef CWin32Font font_t;
#elif defined(OSX)
#include "osxfont.h"
typedef COSXFont font_t;
#elif defined(LINUX)
#elif defined(LINUX) || defined(OSX)
#include "linuxfont.h"
typedef CLinuxFont font_t;
#else