1
0
forked from 0ad/0ad
0ad/source/ps/Font.h
janwas 7838627cd2 - vfs_load now returns error code and takes FileIOBuf; that must be freed via file_buf_free. if Handle is needed, use mem_wrap.
- 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.
2006-01-24 08:16:29 +00:00

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