MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_or_rasterize_from()

const GlyphMetrics * MayaFlux::Portal::Text::GlyphAtlas::get_or_rasterize_from ( FontFace &  face,
FT_UInt  glyph_index 
)
private

Definition at line 50 of file GlyphAtlas.cpp.

51{
52 auto& face_cache = m_cache[&face];
53 if (auto it = face_cache.find(glyph_index); it != face_cache.end()) {
54 return &it->second;
55 }
56
57 if (!rasterize(face, glyph_index)) {
58 return nullptr;
59 }
60
61 return &m_cache.at(&face).at(glyph_index);
62}
std::unordered_map< FontFace *, std::unordered_map< FT_UInt, GlyphMetrics > > m_cache
Per-face glyph cache.
bool rasterize(FontFace &face, FT_UInt glyph_index)

References m_cache, and rasterize().

Referenced by get_or_rasterize(), and get_or_rasterize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: