Font.measureText - multiple declarations
Function Font.measureText
Wraps TTF_MeasureUTF8 (from SDL_ttf 2.0.18) to calculate the maximum number of characters from a text that
can be rendered given a maximum fitting width
std .typecons .Tuple!(uint,"extent",uint,"count") measureText
(
string text,
uint measureWidth
) @trusted const;
Parameters
| Name | Description |
|---|---|
| text | string of characters to measure |
| measureWidth | maximum fitting width |
Returns
named tuple of extent (calculated width) and count (number of characters)
Throws
dsdl if unable to measure text
Function Font.measureText
Wraps TTF_MeasureUNICODE (from SDL_ttf 2.0.18) to calculate the maximum number of characters from a text
that can be rendered given a maximum fitting width
std .typecons .Tuple!(uint,"extent",uint,"count") measureText
(
wstring text,
uint measureWidth
) @trusted const;
Parameters
| Name | Description |
|---|---|
| text | wstring of characters to measure |
| measureWidth | maximum fitting width |
Returns
named tuple of extent (calculated width) and count (number of characters)
Throws
dsdl if unable to measure text