* Return width of character glyph. * @param size Font of the character * @param key Character code glyph * @return Width of the character glyph */
| 1271 | * @return Width of the character glyph |
| 1272 | */ |
| 1273 | uint8_t GetCharacterWidth(FontSize size, char32_t key) |
| 1274 | { |
| 1275 | /* Use _stringwidth_table cache if possible */ |
| 1276 | if (key >= 32 && key < 256) return _stringwidth_table[size][key - 32]; |
| 1277 | |
| 1278 | return GetGlyphWidth(size, key); |
| 1279 | } |
| 1280 | |
| 1281 | /** |
| 1282 | * Return the maximum width of single digit. |
no test coverage detected