Xrb::Font Class Reference

Abstract interface class for all fonts. More...

#include <xrb_font.hpp>

Inheritance diagram for Xrb::Font:

Inheritance graph
[legend]

List of all members.

Classes

struct  LineFormat
 Structure used in text formatting (word wrapping and alignment). More...

Public Types

typedef std::vector< LineFormatLineFormatVector

Public Member Functions

std::string const & FontFacePath () const
ScreenCoord PixelHeight () const
ScreenCoord GlyphWidth (char const *glyph) const
ScreenCoordRect StringRect (char const *string) const
ScreenCoordRect StringRect (LineFormatVector const &line_format_vector) const
void DrawString (RenderContext const &render_context, ScreenCoordVector2 const &initial_pen_position, char const *string) const
void GenerateLineFormatVector (char const *source_string, LineFormatVector *dest_line_format_vector) const
void DrawLineFormattedText (RenderContext const &render_context, ScreenCoordRect const &draw_rect, char const *source_string, LineFormatVector const &line_format_vector, Alignment2 const &alignment) const
virtual void MoveThroughGlyph (FontCoordVector2 *pen_position_26_6, ScreenCoordVector2 const &initial_pen_position, char const *current_glyph, char const *next_glyph, Uint32 *remaining_glyph_count=NULL, FontCoord *major_space_26_6=NULL) const =0
virtual void GenerateWordWrappedString (std::string const &source_string, std::string *dest_string, ScreenCoordVector2 const &text_area_size) const =0

Static Public Member Functions

static FontCreate (std::string const &font_face_path, Sint32 pixel_height)

Protected Member Functions

 Font (std::string const &font_face_path, ScreenCoord pixel_height)
virtual void DrawGlyphSetup (RenderContext const &render_context) const =0
virtual void DrawGlyphShutdown (RenderContext const &render_context) const =0
virtual void DrawGlyph (RenderContext const &render_context, char const *glyph, FontCoordVector2 const &pen_position_26_6) const =0


Detailed Description

Abstract interface class for all fonts.

All fonts must use UTF8 encoding (which conveniently includes standard 7-bit ASCII encoding). Left-to-right and right-to-left fonts are supported, but vertically-rendered fonts are not.

Definition at line 58 of file xrb_font.hpp.


The documentation for this class was generated from the following files:

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8