class OSGTEXT_EXPORT osgText::Font

Pure virtual base class for fonts.

Inheritance:


Public Classes

class FontImplementation: public osg::Referenced
class OSGTEXT_EXPORT GlyphTexture: public osg::Texture2D
class OSGTEXT_EXPORT Glyph: public osg::Image

Public Methods

[more] Font(FontImplementation* implementation=0)
[more]virtual osg::Object* cloneType() const
[more]virtual osg::Object* clone(const osg::CopyOp&) const
[more]virtual bool isSameKindAs(const osg::Object* obj) const
[more]virtual const char* className() const
[more]virtual const char* libraryName() const
[more]virtual std::string getFileName() const
[more]virtual void setSize(unsigned int width, unsigned int height)
Set the pixel width and height hint
[more]unsigned int getWidth() const
[more]unsigned int getHeight() const
[more]virtual osg::Vec2 getKerning(unsigned int leftcharcode, unsigned int rightcharcode, KerningType kerningType)
Get a kerning (adjustment of spacing of two adjacent character) for specified charcodes, wrt the current font size hint
[more]virtual Glyph* getGlyph(unsigned int charcode)
Get a Glyph for specified charcode, and the font size nearest to the current font size hint
[more]virtual bool hasVertical() const
Return true if this font provides vertical alignments and spacing or glyphs
[more]void setGlyphImageMargin(unsigned int margin)
Set the margin around each glyph, to ensure that texture filtering doesn't bleed adjacent glyph's into each other.
[more]unsigned int getGlyphImageMargin() const
[more]void setTextureSizeHint(unsigned int width, unsigned int height)
Set the size of texture to create to store the glyph images when rendering.
[more]unsigned int getTextureWidthHint() const
[more]unsigned int getTextureHeightHint() const
[more]void setMinFilterHint(osg::Texture::FilterMode mode)
Set the minification texture filter to use when creating the texture to store the glyph images when rendering.
[more]osg::Texture::FilterMode getMinFilterHint() const
[more]void setMagFilterHint(osg::Texture::FilterMode mode)
Set the magnification texture filter to use when creating the texture to store the glyph images when rendering.
[more]osg::Texture::FilterMode getMagFilterHint() const
[more]void setImplementation(FontImplementation* implementation)
[more]FontImplementation* getImplementation()
[more]const FontImplementation* getImplementation() const

Protected Fields

[more]SizeGlyphMap _sizeGlyphMap
[more]GlyphTextureList _glyphTextureList
[more]StateSetList _stateSetList
[more]unsigned int _width
[more]unsigned int _height
[more]unsigned int _margin
[more]unsigned int _textureWidthHint
[more]unsigned int _textureHeightHint
[more]osg::Texture::FilterMode _minFilterHint
[more]osg::Texture::FilterMode _magFilterHint
[more]osg::ref_ptr<osg::TexEnv > _texEnv
[more]osg::ref_ptr<FontImplementation> _implementation

Protected Methods

[more]virtual ~Font()
[more]void addGlyph(unsigned int width, unsigned int height, unsigned int charcode, Glyph* glyph)

Protected

[more]typedef std::vector< osg::ref_ptr<GlyphTexture> > GlyphTextureList
[more]typedef std::vector< osg::ref_ptr<osg::StateSet> > StateSetList
[more]typedef std::map< unsigned int, osg::ref_ptr<Glyph> > GlyphMap
[more]typedef std::pair< unsigned int, unsigned int > SizePair
[more]typedef std::map< SizePair, GlyphMap > SizeGlyphMap


Documentation

Pure virtual base class for fonts. Concrete implementation are the DefaultFont found in src/osgText/DefaultFont.cpp and FreeTypeFont found in src/osgPlugins/freetype/FreeTypeFont.cpp
o Font(FontImplementation* implementation=0)

ovirtual osg::Object* cloneType() const

ovirtual osg::Object* clone(const osg::CopyOp&) const

ovirtual bool isSameKindAs(const osg::Object* obj) const

ovirtual const char* className() const

ovirtual const char* libraryName() const

ovirtual std::string getFileName() const

ovirtual void setSize(unsigned int width, unsigned int height)
Set the pixel width and height hint

ounsigned int getWidth() const

ounsigned int getHeight() const

ovirtual osg::Vec2 getKerning(unsigned int leftcharcode, unsigned int rightcharcode, KerningType kerningType)
Get a kerning (adjustment of spacing of two adjacent character) for specified charcodes, wrt the current font size hint

ovirtual Glyph* getGlyph(unsigned int charcode)
Get a Glyph for specified charcode, and the font size nearest to the current font size hint

ovirtual bool hasVertical() const
Return true if this font provides vertical alignments and spacing or glyphs

ovoid setGlyphImageMargin(unsigned int margin)
Set the margin around each glyph, to ensure that texture filtering doesn't bleed adjacent glyph's into each other. Default margin is 2 texels.

ounsigned int getGlyphImageMargin() const

ovoid setTextureSizeHint(unsigned int width, unsigned int height)
Set the size of texture to create to store the glyph images when rendering. Note, this doesn't affect already created Texture Glhph's.

ounsigned int getTextureWidthHint() const

ounsigned int getTextureHeightHint() const

ovoid setMinFilterHint(osg::Texture::FilterMode mode)
Set the minification texture filter to use when creating the texture to store the glyph images when rendering. Note, this doesn't affect already created Texture Glhph's.

oosg::Texture::FilterMode getMinFilterHint() const

ovoid setMagFilterHint(osg::Texture::FilterMode mode)
Set the magnification texture filter to use when creating the texture to store the glyph images when rendering. Note, this doesn't affect already created Texture Glhph's.

oosg::Texture::FilterMode getMagFilterHint() const

ovoid setImplementation(FontImplementation* implementation)

oFontImplementation* getImplementation()

oconst FontImplementation* getImplementation() const

ovirtual ~Font()

ovoid addGlyph(unsigned int width, unsigned int height, unsigned int charcode, Glyph* glyph)

otypedef std::vector< osg::ref_ptr<GlyphTexture> > GlyphTextureList

otypedef std::vector< osg::ref_ptr<osg::StateSet> > StateSetList

otypedef std::map< unsigned int, osg::ref_ptr<Glyph> > GlyphMap

otypedef std::pair< unsigned int, unsigned int > SizePair

otypedef std::map< SizePair, GlyphMap > SizeGlyphMap

oSizeGlyphMap _sizeGlyphMap

oGlyphTextureList _glyphTextureList

oStateSetList _stateSetList

ounsigned int _width

ounsigned int _height

ounsigned int _margin

ounsigned int _textureWidthHint

ounsigned int _textureHeightHint

oosg::Texture::FilterMode _minFilterHint

oosg::Texture::FilterMode _magFilterHint

oosg::ref_ptr<osg::TexEnv > _texEnv

oosg::ref_ptr<FontImplementation> _implementation


This class has no child classes.
Friends:
class FontImplementation

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.