FontFile Class Reference
[Framework Module]

#include <fontfile.h>

Inheritance diagram for FontFile:

DataFile FreeTypeFontFile

List of all members.

Detailed Description

Provides read access to font file.

Whole font is opened first and then you can query each character separetelly. In fact only those characters are loaded that you want to use. Characters are converted into small bitmap with 256 gray levels. You need to set character size and resolution first.
This class is the base for all font files.

Public Member Functions

 FontFile ()
virtual ~FontFile ()
void SetCharSize (const FontFile::CharSize &char_size)
virtual byte_tGetData (ulong_t char_code, bool close=false)
const GlyphDataGetGlyphData ()
ulong_t GetGlyphsCount ()

Public Attributes

ulong_t glyphs_count
 Number of all glyphs.

Protected Member Functions

virtual void DeleteData ()

Protected Attributes

GlyphData glyph_data
 Data of one loaded glyph.
CharSize char_size
 Size of character.
 Loaded character converted into bitmap buffer.


struct  CharSize
struct  GlyphData

Constructor & Destructor Documentation

FontFile::FontFile (  ) 

Constructor. Sets file mode to binary. Default glyph size is set to 12, resolution to 96.

FontFile::~FontFile (  )  [virtual]


Member Function Documentation

void FontFile::SetCharSize ( const FontFile::CharSize char_size  )  [inline]

Sets character size. This information will be used to convert characters into bitmap.

char_size Structure with character size and resolution.

byte_t * FontFile::GetData ( ulong_t  char_code,
bool  close = false 
) [virtual]

Returns bitmap of one character.

char_code Code of wanted character.
close Whether file will be closed after returning the data.
Character bitmap.

Reimplemented in FreeTypeFontFile.

const FontFile::GlyphData & FontFile::GetGlyphData (  )  [inline]

Returns glyph data of loaded character.

Structure with glyph data.

ulong_t FontFile::GetGlyphsCount (  )  [inline]

Returns number of glyphs (characters) in font file.

Number of glyphs.

void FontFile::DeleteData (  )  [protected, virtual]

Deletes loaded data.

Implements DataFile.

Member Data Documentation

ulong_t FontFile::glyphs_count

Number of all glyphs.

GlyphData FontFile::glyph_data [protected]

Data of one loaded glyph.

CharSize FontFile::char_size [protected]

Size of character.

uchar_t* FontFile::data [protected]

Loaded character converted into bitmap buffer.

The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:31 2007 for Dark Oberon by  doxygen 1.5.3