3 #ifndef SCENEVIEW_FONT_RESOURCE_HPP__
4 #define SCENEVIEW_FONT_RESOURCE_HPP__
69 float width_to_height;
85 typedef std::shared_ptr<FontResource> Ptr;
90 const std::shared_ptr<QOpenGLTexture>&
Texture() {
return texture_; }
102 static Ptr Create(
const QFont& font);
106 void Build(
const QFont& font);
112 CharData char_data_[256];
114 std::shared_ptr<QOpenGLTexture> texture_;
119 #endif // SCENEVIEW_FONT_RESOURCE_HPP__
Describes how to draw a character from the font texture map.
Definition: font_resource.hpp:55
const CharData & GetCharData(int c)
Retrieve parameters on how to draw the specified character.
Definition: font_resource.hpp:95
Central repository for resources.
Definition: resource_manager.hpp:36
const std::shared_ptr< QOpenGLTexture > & Texture()
Retrieve the texture.
Definition: font_resource.hpp:90
A font texture map, suitable for rendering fonts using texture-mapped quads.
Definition: font_resource.hpp:25