2002-11-16 08:07:38 +00:00
|
|
|
#ifndef FONT_H
|
|
|
|
|
#define FONT_H
|
2002-03-30 20:00:13 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
File: Font
|
|
|
|
|
|
|
|
|
|
Desc: A holder for information that is used by BitmapText objects.
|
|
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
2002-03-30 20:00:13 +00:00
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "RageTexture.h"
|
|
|
|
|
|
|
|
|
|
const int MAX_FONT_CHARS = 256; // only low ASCII chars are supported
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Font
|
|
|
|
|
{
|
|
|
|
|
public:
|
2002-09-03 22:31:06 +00:00
|
|
|
Font( const CString &sASCIITexturePath );
|
2002-08-13 23:26:46 +00:00
|
|
|
Font( const CString &sTexturePath, const CString& sChars );
|
2002-03-30 20:00:13 +00:00
|
|
|
~Font();
|
|
|
|
|
|
2002-12-29 22:55:26 +00:00
|
|
|
int GetLineWidthInSourcePixels( const CString &szLine );
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
int m_iRefCount;
|
|
|
|
|
|
|
|
|
|
CString m_sTexturePath;
|
|
|
|
|
|
|
|
|
|
RageTexture* m_pTexture;
|
2002-03-31 07:55:25 +00:00
|
|
|
bool m_bCapitalsOnly;
|
2002-09-03 22:31:06 +00:00
|
|
|
int m_iDrawExtraPixelsLeft, m_iDrawExtraPixelsRight; // for italic fonts
|
|
|
|
|
int m_iLineSpacing;
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
int m_iCharToFrameNo[MAX_FONT_CHARS];
|
|
|
|
|
int m_iFrameNoToWidth[MAX_FONT_CHARS]; // in soure coordinate space
|
2002-03-31 07:55:25 +00:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
2002-03-30 20:00:13 +00:00
|
|
|
};
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|