forked from 0ad/0ad
janwas
7838627cd2
- remove ScEd hacks and CFont et al macro rename - fix accursed bug in VFS buffer management that was causing ReadFile to fail without error (not allocating enough padding) - vfs_tree: bugfix in tree_lookup - waio: temporarily disable sector size determination (pending better approach - need to determine if using DVD drive) This was SVN commit r3421.
40 lines
486 B
C++
Executable File
40 lines
486 B
C++
Executable File
#ifndef _FONT_H
|
|
#define _FONT_H
|
|
|
|
#include "ps/Singleton.h"
|
|
#include "ps/CStr.h"
|
|
|
|
#include "lib/res/handle.h"
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
/*
|
|
|
|
To use CFont:
|
|
|
|
CFont font("name");
|
|
font.Bind();
|
|
glwprintf(L"Hello world");
|
|
|
|
*/
|
|
|
|
class CFont
|
|
{
|
|
public:
|
|
CFont(const char* name);
|
|
~CFont();
|
|
|
|
void Bind();
|
|
int GetLineSpacing();
|
|
int GetHeight();
|
|
int GetCharacterWidth(wchar_t c);
|
|
void CalculateStringSize(const CStrW& string, int& w, int& h);
|
|
|
|
private:
|
|
Handle h;
|
|
};
|
|
|
|
|
|
#endif // _FONT_H
|