gui::font Class Reference

A texture containing characters. More...

#include <gui_font.hpp>

Inheritance diagram for gui::font:
gui::gl::font

List of all members.

Public Member Functions

 font ()
 Constructor.
virtual ~font ()
 Destructor.
virtual std::array< float, 4 > get_character_uvs (uint uiChar) const =0
 Returns the uv coordinates of a character on the texture.
virtual float get_character_width (uint uiChar) const =0
 Returns the width of a character in pixels.
virtual float get_character_kerning (uint uiChar1, uint uiChar2) const =0
 Return the kerning amount between two characters.
virtual utils::wptr< materialget_texture () const =0
 Returns the underlying material to use for rendering.

Detailed Description

A texture containing characters.

This class is purely virtual. It needs to be implemented and created by the corresponding gui::manager_impl.

Definition at line 20 of file gui_font.hpp.


Constructor & Destructor Documentation

gui::font::font (  ) 

Constructor.

Definition at line 5 of file gui_font.cpp.

gui::font::~font (  )  [virtual]

Destructor.

Reimplemented in gui::gl::font.

Definition at line 9 of file gui_font.cpp.


Member Function Documentation

virtual float gui::font::get_character_kerning ( uint  uiChar1,
uint  uiChar2 
) const [pure virtual]

Return the kerning amount between two characters.

Parameters:
uiChar1 The first unicode character
uiChar2 The second unicode character
Returns:
The kerning amount between the two characters
Note:
Kerning is a font rendering adjustment that makes some letters closer, for example in 'VA', there is room for the two to be closer than with 'VW'. This has no effect for fixed width fonts (like Courrier, etc).

Implemented in gui::gl::font.

virtual std::array<float,4> gui::font::get_character_uvs ( uint  uiChar  )  const [pure virtual]

Returns the uv coordinates of a character on the texture.

Parameters:
uiChar The unicode character
Returns:
The uv coordinates of this character on the texture
Note:
The uv coordinates are normalisez, i.e. they range from 0 to 1. They are arranged as {u1, v1, u2, v2}.

Implemented in gui::gl::font.

virtual float gui::font::get_character_width ( uint  uiChar  )  const [pure virtual]

Returns the width of a character in pixels.

Parameters:
uiChar The unicode character
Returns:
The width of the character in pixels.

Implemented in gui::gl::font.

virtual utils::wptr<material> gui::font::get_texture (  )  const [pure virtual]

Returns the underlying material to use for rendering.

Returns:
The underlying material to use for rendering

Implemented in gui::gl::font.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Tue Jan 1 21:58:12 2013 for gui by  doxygen 1.6.1