Panda3D
Public Member Functions | Static Public Member Functions

StaticTextFont Class Reference

A StaticTextFont is loaded up from a model that was previously generated via egg-mkfont, and contains all of its glyphs already generated and available for use. More...

#include "staticTextFont.h"

Inheritance diagram for StaticTextFont:
TextFont TypedReferenceCount Namable TypedObject ReferenceCount MemoryBase MemoryBase MemoryBase

List of all members.

Public Member Functions

 StaticTextFont (PandaNode *font_def)
 The constructor expects the root node to a model generated via egg-mkfont, which consists of a set of models, one per each character in the font.
virtual TypeHandle force_init_type ()
virtual bool get_glyph (int character, const TextGlyph *&glyph)
 Gets the glyph associated with the given character code, as well as an optional scaling parameter that should be applied to the glyph's geometry and advance parameters.
virtual TypeHandle get_type () const
virtual PT (TextFont) make_copy() const
virtual void write (ostream &out, int indent_level) const

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Detailed Description

A StaticTextFont is loaded up from a model that was previously generated via egg-mkfont, and contains all of its glyphs already generated and available for use.

It doesn't require linking with any external libraries like FreeType.

Definition at line 40 of file staticTextFont.h.


Constructor & Destructor Documentation

StaticTextFont::StaticTextFont ( PandaNode font_def)

The constructor expects the root node to a model generated via egg-mkfont, which consists of a set of models, one per each character in the font.

Definition at line 39 of file staticTextFont.cxx.

References NodePath::find_all_textures(), TextGlyph::get_advance(), Texture::get_magfilter(), Texture::get_minfilter(), TextureCollection::get_num_textures(), Texture::get_quality_level(), TextureCollection::get_texture(), Texture::set_compression(), and Texture::set_quality_level().


Member Function Documentation

bool StaticTextFont::get_glyph ( int  character,
const TextGlyph *&  glyph 
) [virtual]

Gets the glyph associated with the given character code, as well as an optional scaling parameter that should be applied to the glyph's geometry and advance parameters.

Returns true if the glyph exists, false if it does not. Even if the return value is false, the value for glyph might be filled in with a printable glyph.

Implements TextFont.

Definition at line 211 of file staticTextFont.cxx.

References TextFont::get_invalid_glyph().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations