| 42 | } |
| 43 | |
| 44 | int BitmapFont::getFontWidth(const UString &Text) |
| 45 | { |
| 46 | int textlen = 0; |
| 47 | |
| 48 | auto u32Text = to_u32string(Text); |
| 49 | |
| 50 | for (const auto &c : u32Text) |
| 51 | { |
| 52 | auto glyph = this->getGlyph(c); |
| 53 | textlen += glyph->size.x; |
| 54 | } |
| 55 | return textlen; |
| 56 | } |
| 57 | |
| 58 | int BitmapFont::getFontHeight() const { return fontheight; } |
| 59 |