| 300 | } |
| 301 | |
| 302 | std::tuple<Texture2D*, Rect> FontCache::getCharacterInfo(Font* font, bgfx::CodePoint character) { |
| 303 | const bgfx::GlyphInfo* glyphInfo = SharedFontManager.getGlyphInfo(font->getHandle(), character); |
| 304 | bgfx::Atlas* atlas = glyphInfo->atlas; |
| 305 | const bgfx::AtlasRegion& region = atlas->getRegion(glyphInfo->regionIndex); |
| 306 | if (font->getInfo().sdf) { |
| 307 | return std::make_tuple(atlas->getTexture(), Rect(region.x, region.y, region.width, region.height)); |
| 308 | } |
| 309 | return std::make_tuple(atlas->getTexture(), Rect(region.x, region.y, region.width, region.height)); |
| 310 | } |
| 311 | |
| 312 | const bgfx::GlyphInfo* FontCache::getGlyphInfo(Font* font, bgfx::CodePoint character) { |
| 313 | return SharedFontManager.getGlyphInfo(font->getHandle(), character); |
no test coverage detected