#include <font.h>
Inherited by FontFTGL, and FontTTF.
Inheritance diagram for Font:

Public Member Functions | |
| Font () | |
| Empty constructor. | |
| virtual | ~Font () |
| Empty destructor. | |
| virtual void | RenderUTF8 (const std::string &utf8str, float x, float y)=0 |
| Render UTF-8 encoded string. | |
| virtual int | getTextWidth (const std::string &utf8str)=0 |
| Render some text in 3D.Get With of text in pixels. | |
| virtual int | Ascent ()=0 |
| Get line height. | |
| virtual void | cleanCache () |
| Clean the cache. | |
| virtual int | getWwidth ()=0 |
| Get width of W. | |
The class itself doesn't do anything usefull. It is more like interface. Anyone who need to access font returned from FontManager will have access to this interface. Fonts aren't thread safe and shloud be used only from one thread.
Definition at line 18 of file font.h.
|
|
Empty constructor.
|
|
|
Empty destructor.
|
|
|
Get line height. The value is usefull if you want to render multiline text and need to know height of line.
|
|
|
Clean the cache. Check the whole cache and delete members that weren't used for a long time. The exact behaviour is implementation dependent and cache even doesn't have to be implemented. Reimplemented in FontTTF. |
|
|
Render some text in 3D.Get With of text in pixels. Get width of utf-8 encoded text.
|
|
|
Get width of W. W is usuallu the most width char in font so you may use this as aproximation.
|
|
||||||||||||||||
|
Render UTF-8 encoded string. Render text to specified position. First call may be slower if implementation use some cache for rendered fonts.
|
1.4.5