Public Member Functions | Public Attributes

wit::FontSymbol Class Reference

#include <wit/font.h>

List of all members.

Public Member Functions

 FontSymbol ()

Public Attributes

char * data
signed char texWidth
signed char texHeight
signed char leftBearing
signed char charWidth

Detailed Description

The FontSymbol class encapsulates the data for a single glyph.

For performance reasons, FontSymbol exposes its members directly instead of using accessor and mutator methods.

Generally you will only need to worry about FontSymbol objects if you are creating or customizing fonts, or if you need to query the metrics of a given character.

Be sure to read the warnings on the data member.

Definition at line 13 of file font.h.


Constructor & Destructor Documentation

wit::FontSymbol::FontSymbol (  )

Creates a new FontSymbol object with all metrics set to 0 pixels and null data.

You will not generally need to construct a FontSymbol object directly, as Font::setChar() will create them for you.

Definition at line 63 of file font.cpp.


Member Data Documentation

The advance width of the glyph, in pixels. This is the distance from the start of the glyph's cell to the position that the next glyph should be drawn.

Definition at line 16 of file font.h.

A pointer to a buffer containing a texture in IA4 format. This buffer must remain valid at all times. Most applications will store this buffer directly in the application binary.

As a result, all copies made from a FontSymbol object refer to the same buffer.

Definition at line 15 of file font.h.

The offset between the left side of the glyph's cell and the left side of the glyph texture. A left bearing of 1, for example, will draw the glyph one pixel to the right of the current position.

Definition at line 16 of file font.h.

The height of the glyph's texture, in pixels. Since FontSymbol textures are in the IA4 format, the height is a multiple of 4.

Definition at line 16 of file font.h.

The width of the glyph's texture, in pixels. Since FontSymbol textures are in the IA4 format, the width is a multiple of 8.

Definition at line 16 of file font.h.


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