MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / glyph

Method glyph

dep/agg/include/agg_font_cache_manager.h:277–303  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

275
276 //--------------------------------------------------------------------
277 const glyph_cache* glyph(unsigned glyph_code)
278 {
279 synchronize();
280 const glyph_cache* gl = m_fonts.find_glyph(glyph_code);
281 if (gl)
282 {
283 m_prev_glyph = m_last_glyph;
284 return m_last_glyph = gl;
285 }
286 else
287 {
288 if (m_engine.prepare_glyph(glyph_code))
289 {
290 m_prev_glyph = m_last_glyph;
291 m_last_glyph = m_fonts.cache_glyph(glyph_code,
292 m_engine.glyph_index(),
293 m_engine.data_size(),
294 m_engine.data_type(),
295 m_engine.bounds(),
296 m_engine.advance_x(),
297 m_engine.advance_y());
298 m_engine.write_glyph_to(m_last_glyph->data);
299 return m_last_glyph;
300 }
301 }
302 return 0;
303 }
304
305 //--------------------------------------------------------------------
306 void init_embedded_adaptors(

Callers

nothing calls this directly

Calls 2

find_glyphMethod · 0.45
cache_glyphMethod · 0.45

Tested by

no test coverage detected