h6. [[FontManager]] h6(. » [[FontManager SWI Calls|SWI Calls]] h6((. » Font_StringWidth h2. Font_StringWidth h5. (SWI &40085) |_<^{width:4em}. Entry | | |<^. R1|<^. Pointer to [[Font_Paint Special Characters|string]] | |<^. R2 |<^. Max width in millipoints| |<^. R3 |<^. Max height in millpoints| |<^. R4 |<^. Split character, or -1 for none| |<^. R5 |<^. Max string length| |_<^{width:4em}. Exit || |<^. R1 |<^. Pointer to where scan ended| |<^. R2 |<^. Width of scanned string | |<^. R3 |<^. Height of scanned string| |<^. R4 |<^. Number of split characters found| |<^. R5 |<^. Length of scanned string| h4. Use The purpose of this call is to calculate how wide a string would in the current font under the given limits. h4. Notes This call is deprecated. [[Font_ScanString]] should be used instead. The call can be used to calculate any of the following: * Finding the caret position in a string if the co-ordinates are known * Finding the caret co-ordinates if you know the position * Finding the length of a string when using justification * Calculating where to split lines when formatting (set R4=32) * Calculating the required data for justification h4. See also * [[Font_ScanString]]