h6. [[WindowManager]] h6(. » [[WindowManager SWI Calls|SWI Calls]] h6((. » [[Wimp_TextOp|Wimp_TextOp]] h6(((. » Wimp_TextOp (Calculate Width of String) h2. Wimp_TextOp (Calculate Width of String) h5. (Reason Code 1) |_<^. Entry |_<^. | |<^. R0 |<^. 1 | |<^. |<^. + b31 to return coverage [4.3+, not 5] | |<^. R1 |<^. Pointer to ctrl-terminated string | |/2<^. R2 |<^. Number of Characters to scan, or | |<^. 0 for whole string | |_<^. Exit |_<^. | |<^. R0 |<^. String width in OS units | |<^. R1 |<^. Preserved | |<^. R2 |<^. Preserved | h4. Use With a reason code of 1, this call returns the width of a specified string using the current desktop font. h4. Notes This is often used prior to plotting a string to an icon, in case the icon needs to be resized. The value returned is in OS units. In RO4/6 b31 requests coverage: the maximum of advance width and the bounding box. h4. See also * [[Wimp_ResizeIcon|Wimp_ResizeIcon]] * [[Wimp_SetFontColours|Wimp_SetFontColours]] * [[Wimp_TextOp|Wimp_TextOp]] * [[Wimp_TextOp 0|Wimp_TextOp 0]] * [[Wimp_TextOp 2|Wimp_TextOp 2]] * [[Wimp_TextOp 3|Wimp_TextOp 3]] * [[Wimp_TextOp 4|Wimp_TextOp 4]]