Skip to content

Commit

Permalink
font: fix build since abc cache in basefont
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jun 8, 2022
1 parent 8e2ce07 commit 0a28db3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 33 deletions.
3 changes: 1 addition & 2 deletions font/StbFont.cpp
Expand Up @@ -38,9 +38,8 @@ GNU General Public License for more details.
#include "Utils.h"

CStbFont::CStbFont() : CBaseFont(),
m_ABCCache(0, 0), m_szRealFontFile(), m_pFontData( NULL )
m_szRealFontFile(), m_pFontData( NULL )
{
SetDefLessFunc( m_ABCCache );
}

CStbFont::~CStbFont()
Expand Down
13 changes: 0 additions & 13 deletions font/StbFont.h
Expand Up @@ -20,16 +20,6 @@ GNU General Public License for more details.
#include "utlrbtree.h"
#include "stb_truetype.h"

struct abc_t
{
int ch;
int a, b, c;

bool operator< (const abc_t &a) const
{
return ch < a.ch;
}
};

class CStbFont : public CBaseFont
{
Expand All @@ -48,8 +38,6 @@ class CStbFont : public CBaseFont
bool HasChar( int ch ) const override;

private:
CUtlRBTree<abc_t, int> m_ABCCache;

char m_szRealFontFile[4096];
bool FindFontDataFile(const char *name, int tall, int weight, int flags, char *dataFile, int dataFileChars);

Expand All @@ -58,7 +46,6 @@ class CStbFont : public CBaseFont

float scale;


friend class CFontManager;
};

Expand Down
3 changes: 1 addition & 2 deletions font/WinAPIFont.cpp
Expand Up @@ -21,9 +21,8 @@ GNU General Public License for more details.
#include "WinAPIFont.h"


CWinAPIFont::CWinAPIFont( ) : CBaseFont( ), m_ABCCache( 0, 0 )
CWinAPIFont::CWinAPIFont( ) : CBaseFont( )
{
SetDefLessFunc( m_ABCCache );
}

CWinAPIFont::~CWinAPIFont( )
Expand Down
16 changes: 0 additions & 16 deletions font/WinAPIFont.h
Expand Up @@ -27,17 +27,6 @@ GNU General Public License for more details.
#include "utlmemory.h"
#include "utlrbtree.h"

struct abc_t
{
int ch;
int a, b, c;

bool operator<(const abc_t &a) const
{
return ch < a.ch;
}
};

class CWinAPIFont : public CBaseFont
{
public:
Expand All @@ -57,20 +46,15 @@ class CWinAPIFont : public CBaseFont
bool m_bFound;

private:
CUtlRBTree<abc_t, int> m_ABCCache;

HFONT m_hFont;
HDC m_hDC;
HBITMAP m_hDIB;


int m_rgiBitmapSize[2];

// pointer to buffer for use when generated bitmap versions of a texture

unsigned char *m_pBuf;


friend class CFontManager;
friend int CALLBACK FontEnumProc( const LOGFONT *, const TEXTMETRIC *, DWORD, LPARAM lpParam );
};
Expand Down

0 comments on commit 0a28db3

Please sign in to comment.