00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __IVIDEO_FONTSERV_H__
00020 #define __IVIDEO_FONTSERV_H__
00021
00022 #include "csutil/scf.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00034 #define CSFONT_LARGE "*large"
00035
00036 #define CSFONT_ITALIC "*italic"
00037
00038 #define CSFONT_COURIER "*courier"
00039
00040 #define CSFONT_SMALL "*small"
00041
00042 struct iFont;
00043
00044 SCF_VERSION (iFontDeleteNotify, 0, 0, 1);
00045
00056 struct iFontDeleteNotify : public iBase
00057 {
00059 virtual void BeforeDelete (iFont* font) = 0;
00060 };
00061
00062 SCF_VERSION (iFont, 1, 0, 1);
00063
00068 struct iFont : public iBase
00069 {
00076 virtual void SetSize (int iSize) = 0;
00077
00082 virtual int GetSize () = 0;
00083
00088 virtual void GetMaxSize (int &oW, int &oH) = 0;
00089
00094 virtual bool GetGlyphSize (uint8 c, int &oW, int &oH) = 0;
00095
00101 virtual uint8 *GetGlyphBitmap (uint8 c, int &oW, int &oH) = 0;
00102
00106 virtual void GetDimensions (const char *text, int &oW, int &oH) = 0;
00107
00112 virtual int GetLength (const char *text, int maxwidth) = 0;
00113
00120 virtual void AddDeleteCallback (iFontDeleteNotify* func) = 0;
00121
00125 virtual bool RemoveDeleteCallback (iFontDeleteNotify* func) = 0;
00126 };
00127
00128 SCF_VERSION (iFontServer, 2, 0, 0);
00129
00138 struct iFontServer : public iBase
00139 {
00144 virtual iFont *LoadFont (const char *filename) = 0;
00145
00149 virtual int GetFontCount () = 0;
00150
00158 virtual iFont *GetFont (int iIndex) = 0;
00159 };
00160
00161 #endif // __IVIDEO_FONTSERV_H__