----------------- GET WIDTH ---------------------
| 46 | } |
| 47 | // ----------------- GET WIDTH --------------------- |
| 48 | int Font::getTextHeight(const char *pszStr) const |
| 49 | { |
| 50 | // verify valid size index |
| 51 | if ( !pszStr || !this->isValid() ) |
| 52 | return 0; |
| 53 | |
| 54 | int size = this->Ymax; |
| 55 | for ( ; *pszStr; ++pszStr ) |
| 56 | { |
| 57 | if ( *pszStr == '\n' ) |
| 58 | size += this->Ymax; |
| 59 | } |
| 60 | return size; |
| 61 | } |
| 62 | |
| 63 | int Font::maxWidth() const |
| 64 | { |