#include <OgreFont.h>
Inheritance diagram for Ogre::Font:
Public Methods | |
Font (const String &name) | |
Constructor. More... | |
virtual | ~Font () |
void | setType (FontType ftype) |
Sets the type of font. More... | |
FontType | getType (void) |
Gets the type of font. More... | |
void | setSource (const String &source) |
Sets the source of the font. More... | |
const String & | getSource (void) |
Gets the source this font (either an image or a truetype font). More... | |
void | setTrueTypeSize (Real ttfSize) |
Sets the size of a truetype font (only required for FT_TRUETYPE). More... | |
void | setTrueTypeResolution (uint ttfResolution) |
Gets the resolution (dpi) of the font used to generate the texture (only required for FT_TRUETYPE). More... | |
Real | getTrueTypeSize (void) |
Gets the point size of the font used to generate the texture. More... | |
uint | getTrueTypeResolution (void) |
Gets the resolution (dpi) of the font used to generate the texture. More... | |
std::pair< uint, uint > | StrBBox (const String &text, Real char_height, RenderWindow &window) |
Returns the size in pixels of a box that could contain the whole string. More... | |
virtual void | load () |
See Resource. More... | |
virtual void | unload () |
See Resource. More... | |
void | getGlyphTexCoords (OgreChar id, Real &u1, Real &v1, Real &u2, Real &v2) const |
Returns the teture coordinates of the associated glyph. More... | |
void | setGlyphTexCoords (OgreChar id, Real u1, Real v1, Real u2, Real v2) |
Sets the texture coordinates of a glyph. More... | |
Real | getGlyphAspectRatio (OgreChar id) const |
Gets the aspect ratio (width / height) of this character. More... | |
void | setGlyphAspectRatio (OgreChar id, Real ratio) |
Sets the aspect ratio (width / height) of this character. More... | |
const Material * | getMaterial () const |
Gets the material generated for this font. More... | |
Material * | getMaterial () |
Gets the material generated for this font. More... | |
void | setAntialiasColour (bool enabled) |
Sets whether or not the colour of this font is antialiased as it is generated from a true type font. More... | |
bool | getAntialiasColour (void) |
virtual size_t | getSize (void) |
Retrieves info about the size of the resource. More... | |
void | touch (void) |
'Touches' the resource to indicate it has been used. More... | |
time_t | getLastAccess (void) const |
Gets the last time the resource was 'touched'. More... | |
const String & | getName (void) const |
Gets resource name. More... | |
bool | isLoaded (void) const |
Returns true if the Resource has been loaded, false otherwise. More... | |
virtual void | destroy () |
A method to make the resource delete itself. More... | |
Protected Methods | |
void | createTextureFromFont (void) |
Internal method for loading from ttf. More... | |
Protected Attributes | |
FontType | mType |
The type of font. More... | |
String | mSource |
Source of the font (either an image name or a truetype font). More... | |
Real | mTtfSize |
Size of the truetype font, in points. More... | |
uint | mTtfResolution |
Resolution (dpi) of truetype font. More... | |
Real | mTexCoords_u1 [OGRE_NUM_GLYPHS] |
Start u coords. More... | |
Real | mTexCoords_u2 [OGRE_NUM_GLYPHS] |
End u coords. More... | |
Real | mTexCoords_v1 [OGRE_NUM_GLYPHS] |
Start v coords. More... | |
Real | mTexCoords_v2 [OGRE_NUM_GLYPHS] |
End v coords. More... | |
Real | mAspectRatio [OGRE_NUM_GLYPHS] |
Aspect ratio between x and y (width / height). More... | |
Material * | mpMaterial |
The material which is generated for this font. More... | |
bool | mAntialiasColour |
for TRUE_TYPE font only. More... | |
String | mName |
bool | mIsLoaded |
time_t | mLastAccess |
size_t | mSize |
|
Constructor.
|
|
|
|
Internal method for loading from ttf.
|
|
A method to make the resource delete itself.
|
|
|
|
Gets the aspect ratio (width / height) of this character.
|
|
Returns the teture coordinates of the associated glyph.
|
|
Gets the last time the resource was 'touched'.
|
|
Gets the material generated for this font.
|
|
Gets the material generated for this font.
|
|
Gets resource name.
Reimplemented in Ogre::Material. |
|
Retrieves info about the size of the resource.
|
|
Gets the source this font (either an image or a truetype font).
|
|
Gets the resolution (dpi) of the font used to generate the texture.
|
|
Gets the point size of the font used to generate the texture.
|
|
Gets the type of font.
|
|
Returns true if the Resource has been loaded, false otherwise.
|
|
See Resource.
Implements Ogre::Resource. |
|
Sets whether or not the colour of this font is antialiased as it is generated from a true type font.
|
|
Sets the aspect ratio (width / height) of this character.
|
|
Sets the texture coordinates of a glyph.
|
|
Sets the source of the font.
|
|
Gets the resolution (dpi) of the font used to generate the texture (only required for FT_TRUETYPE).
|
|
Sets the size of a truetype font (only required for FT_TRUETYPE).
|
|
Sets the type of font. Must be set before loading. |
|
Returns the size in pixels of a box that could contain the whole string.
|
|
'Touches' the resource to indicate it has been used.
|
|
See Resource.
Reimplemented from Ogre::Resource. |
|
for TRUE_TYPE font only.
|
|
Aspect ratio between x and y (width / height).
|
|
|
|
|
|
|
|
The material which is generated for this font.
|
|
|
|
Source of the font (either an image name or a truetype font).
|
|
Start u coords.
|
|
End u coords.
|
|
Start v coords.
|
|
End v coords.
|
|
Resolution (dpi) of truetype font.
|
|
Size of the truetype font, in points.
|
|
The type of font.
|
Copyright © 2002 by The OGRE Team