NS/releases/3.05/source/external/vgui/include/VGUI_Font.h
tankefugl b5590dd5d9 made a copy
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@144 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-05-29 11:34:28 +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