* Get the width of the string in pixels. * * @param string The string to get the width of. * @return The width of the string in pixels. */
| 38 | * @return The width of the string in pixels. |
| 39 | */ |
| 40 | uint16 Font_GetStringWidth(const char *string) |
| 41 | { |
| 42 | uint16 width = 0; |
| 43 | |
| 44 | if (string == NULL) return 0; |
| 45 | |
| 46 | while (*string != '\0') { |
| 47 | width += Font_GetCharWidth(*string++); |
| 48 | } |
| 49 | |
| 50 | return width; |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Load a font file. |
no test coverage detected