12#include "boost/filesystem.hpp"
111 void LoadGlyphsFromCodePointRange(std::uint32_t begin, std::uint32_t end);
117 void EnsureGlyphs(
const std::vector<std::uint32_t>& codePoints);
123 void EnsureGlyphs(
const std::vector<GlyphIndex>& glyphIndexes);
129 void StoreFontAtlasesInFiles(
bool in);
149 std::string GetFontAtlasTextureName(
GlyphIndex glyphIndex)
const;
156 std::string GetFontAtlasMaterialName(
GlyphIndex glyphIndex)
const;
163 GlyphIndex GetIndexFromCodePoint(std::uint32_t codePoint)
const;
169 FT_Face GetFontFace();
177 std::pair<GlyphMetrics, ImageData> CreateGlyphBitmapBy(
GlyphIndex glyphIndex);
184 std::pair<GlyphMetrics, ImageData> CreateGlyphBitmapBy(std::uint32_t codePoint);
190 void CreateFontAtlasFromList(
const std::vector<GlyphIndex>& glyphIndexes);
197 void CreateFontAtlasFromRange(std::uint32_t begin, std::uint32_t end);
204 bool HasGlyph(uint32_t codePoint)
const;
216 FT_Error mErrorResult = FT_Err_Ok;
225 std::unordered_map<std::uint32_t, std::pair<GlyphMetrics, std::string>>
mGlyphsByIndex;
232 bool bStoreFontAtlasesInFiles =
false;
Manages glyph data, font atlases, and font-level metrics.
static std::uint32_t sMaxGlyphsPerFontAtlas
Maximum number of glyphs per font atlas.
const unsigned int mFontSize
TextRenderer * mTextRenderer
std::unordered_map< std::uint32_t, std::pair< GlyphMetrics, std::string > > mGlyphsByIndex
static unsigned int sFontAtlasPaddingPx
Padding in pixels around glyphs inside atlases.
std::vector< uint8_t > mFontFileBytes
RenderResourceContext mRenderResourceContext
std::unordered_map< std::string, std::string > mFontAtlases
Represents raw 2D image data stored in memory.
Central text system manager and font resource registry.
Global metrics describing font vertical layout.
Opaque glyph identifier within a font.
Metrics describing a single glyph and its atlas placement.
Aggregates pointers to global rendering resource managers.