| 292 | } |
| 293 | |
| 294 | Sprite* FontCache::createCharacter(Font* font, bgfx::CodePoint character) { |
| 295 | Texture2D* texture; |
| 296 | Rect rect; |
| 297 | std::tie(texture, rect) = getCharacterInfo(font, character); |
| 298 | Sprite* sprite = Sprite::create(texture, rect); |
| 299 | return sprite; |
| 300 | } |
| 301 | |
| 302 | std::tuple<Texture2D*, Rect> FontCache::getCharacterInfo(Font* font, bgfx::CodePoint character) { |
| 303 | const bgfx::GlyphInfo* glyphInfo = SharedFontManager.getGlyphInfo(font->getHandle(), character); |
no test coverage detected