* Initialize _stringwidth_table cache for the specified font sizes. * @param fontsizes Font sizes to initialise. */
| 1254 | * @param fontsizes Font sizes to initialise. |
| 1255 | */ |
| 1256 | void LoadStringWidthTable(FontSizes fontsizes) |
| 1257 | { |
| 1258 | FontCache::ClearFontCaches(fontsizes); |
| 1259 | |
| 1260 | for (FontSize fs : fontsizes) { |
| 1261 | for (uint i = 0; i != 224; i++) { |
| 1262 | _stringwidth_table[fs][i] = GetGlyphWidth(fs, i + 32); |
| 1263 | } |
| 1264 | } |
| 1265 | } |
| 1266 | |
| 1267 | /** |
| 1268 | * Return width of character glyph. |
no test coverage detected