| 284 | } |
| 285 | |
| 286 | int32_t FontSpriteGetCodepointOffset(int32_t codepoint) |
| 287 | { |
| 288 | // Only search the table when its in range of the map. |
| 289 | if (static_cast<char32_t>(codepoint) >= _smallestCodepointValue |
| 290 | && static_cast<char32_t>(codepoint) <= _biggestCodepointValue) |
| 291 | { |
| 292 | auto result = codepointOffsetMap.find(codepoint); |
| 293 | if (result != codepointOffsetMap.end()) |
| 294 | return result->second; |
| 295 | } |
| 296 | |
| 297 | if (codepoint < 32 || codepoint >= 256) |
| 298 | codepoint = '?'; |
| 299 | |
| 300 | return codepoint - 32; |
| 301 | } |
| 302 | |
| 303 | int32_t FontSpriteGetCodepointWidth(FontStyle fontStyle, int32_t codepoint) |
| 304 | { |
no test coverage detected