0ad/source/ps/Font.h
janwas 6e82e33ccf - display_msg and display_error -> debug prefix since in debug header
- debug_warn_err now takes LibError
- lib_error.cpp: revise error code -> string (only support liberror
now); add function to set errno from LibError
- unifont, CFont: parameter made a simple wchar_t from const wchar_t&
- mmap now sets errno
- Loader and VfsUtil function now return LibError as well
- Profile.cpp, ProfileViewer.cpp: fix int/uint/size_t warnings
- Renderer.cpp: fix cannot-generate-assignment-operator warning

This was SVN commit r3235.
2005-12-12 19:19:30 +00:00

43 lines
551 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");
*/
// MFC has nicked all the good names :-(
#define CFont PS_CFont
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