OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
QFontImplementation.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 2009-2010 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 #ifndef QFontImplementation_H
14 #define QFontImplementation_H
15 
16 #include <osgText/Font>
17 #include <osgQt/Export>
18 #include <osgQt/Version>
19 
20 #include <QtGui/QFont>
21 
22 #include <string>
23 
24 namespace osgQt {
25 
27 {
28 public:
29  QFontImplementation(const QFont& font);
30  virtual ~QFontImplementation();
31 
32  virtual std::string getFileName() const;
33 
34  virtual bool supportsMultipleFontResolutions() const { return true; }
35 
36  virtual osgText::Glyph* getGlyph(const osgText::FontResolution& fontRes, unsigned int charcode);
37 
38  virtual osgText::Glyph3D* getGlyph3D(unsigned int /*charcode*/) { return 0; }
39 
40  virtual osg::Vec2 getKerning(unsigned int leftcharcode, unsigned int rightcharcode, osgText::KerningType kerningType);
41 
42  virtual bool hasVertical() const;
43 
44 protected:
45 
46  std::string _filename;
47  QFont _font;
48 };
49 
50 }
51 
52 #endif
std::pair< unsigned int, unsigned int > FontResolution
Definition: KerningType.h:20
virtual osgText::Glyph3D * getGlyph3D(unsigned int)
#define OSGQT_EXPORT
Definition: Export.h:40
virtual bool supportsMultipleFontResolutions() const