20 #if !defined(__MITSUBA_HW_FONT_H_)
21 #define __MITSUBA_HW_FONT_H_
80 void drawText(
Bitmap *dest,
Point2i pos,
const std::string &text)
const;
83 Vector2i getSize(
const std::string &text)
const;
96 inline const std::string &
getName()
const {
return m_name; }
124 int8_t m_kerningMatrix[256*256];
125 int m_maxVerticalBearing;
GPUTexture * getTexture()
Return the associated texture.
Definition: font.h:104
General-purpose bitmap class with read and write support for several common file formats.
Definition: bitmap.h:50
Vector2i size
Glyph size in pixels.
Definition: font.h:45
Utility class used to render text inside OpenGL programs using pre-rasterized TrueType fonts stored a...
Definition: font.h:34
Glyph metrics data structure.
Definition: font.h:37
EPixelFormat
Definition: bitmap.h:61
const std::string & getName() const
Return the name of this font.
Definition: font.h:96
const GPUTexture * getTexture() const
Return the associated texture (const version)
Definition: font.h:107
int8_t getKerning(char i, char o) const
Return an entry from the kerning table.
Definition: font.h:99
int32_t verticalBearing
Vertical bearing of this glyph.
Definition: font.h:60
Point2 tx
Position on the font texture.
Definition: font.h:39
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
Reference counting helper.
Definition: ref.h:40
int32_t horizontalAdvance
Horizontal advance value of this glyph.
Definition: font.h:67
Abstract renderer implementation.
Definition: renderer.h:79
A data structure for 1/2/3D and cube texture mapping. Also has optional render-to-texture functionali...
Definition: gputexture.h:32
const Glyph & getGlyph(char c) const
Return the glyph data structure for a specified character.
Definition: font.h:110
EFont
List of supplied fonts.
Definition: font.h:71
EComponentFormat
Supported per-component data formats.
Definition: bitmap.h:97
Parent of all Mitsuba classes.
Definition: object.h:38
int getMaxVerticalBearing() const
Return the max. vertical bearing.
Definition: font.h:113
Vector2 ts
Size on the font texture.
Definition: font.h:42
int32_t horizontalBearing
Horizontal bearing of this glyph.
Definition: font.h:53