NS/releases/3.03/source/external/vgui/include/VGUI_Font.h
tankefugl 54a4ac5469 o Branched from 3.02
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@85 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-04-26 15:38:32 +00:00

42 lines
No EOL
1.4 KiB
C++

#ifndef VGUI_FONT_H
#define VGUI_FONT_H
#include<VGUI.h>
namespace vgui
{
class BaseFontPlat;
//TODO: cursors and fonts should work like gl binds
class VGUIAPI Font
{
public:
Font(const char* name,int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
// If pFileData is non-NULL, then it will try to load the 32-bit (RLE) TGA file. If that fails,
// it will create the font using the specified parameters.
// pUniqueName should be set if pFileData and fileDataLen are set so it can determine if a font is already loaded.
Font(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
private:
virtual void init(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
public:
BaseFontPlat* getPlat();
virtual void getCharRGBA(int ch,int rgbaX,int rgbaY,int rgbaWide,int rgbaTall,uchar* rgba);
virtual void getCharABCwide(int ch,int& a,int& b,int& c);
virtual void getTextSize(const char* text,int& wide,int& tall);
virtual int getTall();
virtual int getId();
protected:
char* _name;
BaseFontPlat* _plat;
int _id;
friend class Surface;
};
void Font_Reset();
}
#endif