* Return the maximum width of single digit. * @param size Font of the digit * @return Width of the digit. */
| 1284 | * @return Width of the digit. |
| 1285 | */ |
| 1286 | uint8_t GetDigitWidth(FontSize size) |
| 1287 | { |
| 1288 | uint8_t width = 0; |
| 1289 | for (char c = '0'; c <= '9'; c++) { |
| 1290 | width = std::max(GetCharacterWidth(size, c), width); |
| 1291 | } |
| 1292 | return width; |
| 1293 | } |
| 1294 | |
| 1295 | /** |
| 1296 | * Determine the broadest digits for guessing the maximum width of a n-digit number. |
no test coverage detected