root/OpenSceneGraph/trunk/src/osgPlugins/txf/TXFFont.h @ 13041

Revision 13041, 1.5 kB (checked in by robert, 3 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 2006 Mathias Froehlich
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12 */
13
14#ifndef TXF_FONT
15#define TXF_FONT
16
17#include <iosfwd>
18#include <string>
19#include <map>
20#include <osgText/Font>
21
22class TXFFont : public osgText::Font::FontImplementation
23{
24public:
25    TXFFont(const std::string& filename);
26
27    virtual ~TXFFont();
28
29    virtual std::string getFileName() const;
30
31    virtual bool supportsMultipleFontResolutions() const { return false; }
32
33    virtual osgText::Glyph* getGlyph(const osgText::FontResolution& fontRes, unsigned int charcode);
34
35    virtual osgText::Glyph3D* getGlyph3D(unsigned int) { return 0; }
36
37    virtual bool hasVertical() const;
38
39    virtual osg::Vec2 getKerning(unsigned int leftcharcode,unsigned int rightcharcode, osgText::KerningType kerningType);
40
41    bool loadFont(std::istream& stream);
42
43protected:
44    typedef std::map<unsigned int, osg::ref_ptr<osgText::Glyph> > GlyphMap;
45
46    std::string _filename;
47    GlyphMap _chars;
48};
49
50#endif
Note: See TracBrowser for help on using the browser.