* Return the string dimension in pixels. The height and width are returned * in a single Dimension value. TINYFONT, BIGFONT modifiers are only * supported as the first character of the string. The returned dimensions * are therefore a rough estimation correct for all the current strings * but not every possible combination * @param str string to calculate pixel-width * @param start_fontsize
| 895 | * @return string width and height in pixels |
| 896 | */ |
| 897 | Dimension GetStringBoundingBox(std::string_view str, FontSize start_fontsize) |
| 898 | { |
| 899 | Layouter layout(str, INT32_MAX, start_fontsize); |
| 900 | return layout.GetBounds(); |
| 901 | } |
| 902 | |
| 903 | /** |
| 904 | * Get bounding box of a string. |
no test coverage detected