12 #ifndef hifi_TextRenderer3D_h
13 #define hifi_TextRenderer3D_h
16 #include <glm/glm.hpp>
18 #include "text/Font.h"
19 #include "TextEffect.h"
20 #include "TextAlignment.h"
21 #include "FontFamilies.h"
23 class TextRenderer3D {
25 static TextRenderer3D* getInstance(
const char* family);
27 glm::vec2 computeExtent(
const QString& str)
const;
28 float getFontSize()
const;
30 void draw(gpu::Batch& batch,
float x,
float y,
const glm::vec2& bounds,
31 const QString& str,
const glm::vec4& color,
bool unlit,
bool forward);
32 void draw(gpu::Batch& batch,
float x,
float y,
const glm::vec2& bounds,
float scale,
33 const QString& str,
const QString& font,
const glm::vec4& color,
const glm::vec3& effectColor,
34 float effectThickness, TextEffect effect, TextAlignment alignment,
bool unlit,
bool forward);
37 TextRenderer3D(
const char* family);
41 std::shared_ptr<Font> _font;
42 Font::DrawInfo _drawInfo;