| 274 | } |
| 275 | |
| 276 | ResFont::HGEFont::HGEFont(std::unordered_map<wchar_t, f2dGlyphInfo>&& org, fcyRefPointer<f2dTexture2D> pTex) |
| 277 | : m_Charset(std::move(org)), m_pTex(pTex) |
| 278 | { |
| 279 | // �����������ΪLineHeight |
| 280 | m_fLineHeight = 0; |
| 281 | for (auto i = m_Charset.begin(); i != m_Charset.end(); ++i) |
| 282 | m_fLineHeight = ::max(m_fLineHeight, i->second.GlyphSize.y); |
| 283 | |
| 284 | // ������������ |
| 285 | for (auto& i : m_Charset) |
| 286 | { |
| 287 | i.second.GlyphPos.a.x /= pTex->GetWidth(); |
| 288 | i.second.GlyphPos.b.x /= pTex->GetWidth(); |
| 289 | i.second.GlyphPos.a.y /= pTex->GetHeight(); |
| 290 | i.second.GlyphPos.b.y /= pTex->GetHeight(); |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | fFloat ResFont::HGEFont::GetLineHeight() |
| 295 | { |
nothing calls this directly
no outgoing calls
no test coverage detected