FontFactory Struct Reference
[Font and Text Services]

Inherits Service.

Inherited by FontFactoryImpl.

List of all members.

Public Methods

virtual bool initialize ()=0
virtual bool setTypeface (const Char *filename)=0
virtual bool setPixelSize (int pixels)=0
virtual void setGlyphs (const Char *glyphs)=0
virtual bool setMaxTextureSize (int size)=0
virtual void antialias (bool yesNo)=0
virtual TextureFontcreateTextureFont ()=0


Detailed Description

Generate a new font object.

FontFactory uses FreeType2 (http://www.freetype.org/) to generate the font information. The FT2 shared library must be present in order for this service to work.


Member Function Documentation

virtual void FontFactory::antialias bool    yesNo [pure virtual]
 

Enable/disable antialiasing. Enabled by default.

virtual TextureFont* FontFactory::createTextureFont   [pure virtual]
 

Create a texture font.

virtual bool FontFactory::initialize   [pure virtual]
 

Initialize the factory and the FreeType engine.

Returns:
True if successful, false if the FreeType engine could not be started.

virtual void FontFactory::setGlyphs const Char   glyphs [pure virtual]
 

Specify a set of characters for the new font. If you do not specify a glyph list, you will get the standard ASCII character set.

virtual bool FontFactory::setMaxTextureSize int    size [pure virtual]
 

Specify a maximum size for the texture. The parameter size must be a power of two and greater than four. The default is 256.

virtual bool FontFactory::setPixelSize int    pixels [pure virtual]
 

Specify the size of the character cell, in pixels. From the FreeType documentation: "The character size is really the size of an abstract square called the EM, used to design the font. However, depending on the font design, glyphs will be smaller or greater than the EM. This means that setting the pixel size to, say, 8x8 doesn't guarantee in any way that you will get glyph bitmaps that all fit within an 8x8 cell (sometimes even far from it)."

Returns:
True if successful, false if pixels is out of the valid range of sizes.

virtual bool FontFactory::setTypeface const Char   filename [pure virtual]
 

Specify the typeface for the font. FontFactory supports TrueType and Type1 fonts.

Parameters:
filename  The font file path.


The documentation for this struct was generated from the following file:


Flat Four Engine
Copyright (C) 2001 by 379, Inc.
This page generated by Doxygen