* Returns a particular character from the set stored in the font. * @param c Character to use for size/position. * @return Pointer to the font's surface with the respective * cropping rectangle set up. */
| 178 | * cropping rectangle set up. |
| 179 | */ |
| 180 | Surface *Font::getChar(wchar_t c) |
| 181 | { |
| 182 | if (_chars.find(c) == _chars.end()) |
| 183 | { |
| 184 | return 0; |
| 185 | } |
| 186 | _surface->getCrop()->x = _chars[c].x; |
| 187 | _surface->getCrop()->y = _chars[c].y; |
| 188 | _surface->getCrop()->w = _chars[c].w; |
| 189 | _surface->getCrop()->h = _chars[c].h; |
| 190 | return _surface; |
| 191 | } |
| 192 | /** |
| 193 | * Returns the maximum width for any character in the font. |
| 194 | * @return Width in pixels. |
no test coverage detected