| 314 | } |
| 315 | |
| 316 | const bgfx::GlyphInfo* FontCache::updateCharacter(Sprite* sp, Font* font, bgfx::CodePoint character) { |
| 317 | const bgfx::GlyphInfo* glyphInfo = SharedFontManager.getGlyphInfo(font->getHandle(), character); |
| 318 | bgfx::Atlas* atlas = glyphInfo->atlas; |
| 319 | const bgfx::AtlasRegion& region = atlas->getRegion(glyphInfo->regionIndex); |
| 320 | sp->setTexture(atlas->getTexture()); |
| 321 | sp->setTextureRect(Rect(region.x, region.y, region.width, region.height)); |
| 322 | sp->setSize(sp->getTextureRect().size); |
| 323 | return glyphInfo; |
| 324 | } |
| 325 | |
| 326 | NS_DORA_END |
no test coverage detected