Set colours for desktop font operations
| R0 | = | 0 (set font colours) |
| R1 | = | Foreground colour (&BBGGRR00) |
| R2 | = | Background colour (&BBGGRR00) |
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
This SWI sets the colours to use for subsequent desktop font operations.
Read the width of a string in the desktop font
| R0 | = | 1 (read string size) + flags:
| Bit(s) | Meaning |
| 31 | Return size covered by string |
|
| R1 | = | Pointer to string |
| R2 | = | Number of characters to process, or 0 for the entire string |
| R0 | = | Width of string in desktop font in OS units |
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
This SWI is used to read the width of a string when rendered on the screen. Bit 31 controls whether the space covered by the string is returned rather than the baseline offset at which the string ends. This distinction must be made because certain fonts (italic fonts, for example) will end at a baseline position before the end of the rendered font. With the bit set the whole area covered will be returned. Thus, if this call is required for locating the end of a string such that another may be added (for example, in another colour) then bit 31 should be clear. If, however, this call is being used to calculate the size required for the font such that it is entirely rendered (for example, in calculating the size of an icon's bounding box), bit 31 should be set.
Plot a text string in the desktop font
| R0 | = | 2 (plot text string) + flags:
| Bit(s) | Meaning |
| 8-26 | Reserved, must be 0 |
| 27 | Reserved for future expansion |
| 28 | Centre text vertically |
| 29 | X/Y offsets are offsets within the current redraw window, rather than screen offsets |
| 30 | Vertically justify to make the baseline the same as system font |
| 31 | Right justify string |
|
| R1 | = | Pointer to string |
| R2 | = | Reserved (must be -1) |
| R3 | = | Reserved (must be -1) |
| R4 | = | X co-ordinate, in OS units |
| R5 | = | Y co-ordinate, in OS units |
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
This SWI is used to plot a text string in the desktop font.
Find the split point in a string
| R0 | = | 3 (get split point) |
| R1 | = | Pointer to string |
| R2 | = | Width to split at in OS units |
| R3 | = | Split character, or -1 for none |
| R0 | = | Pointer to split point in supplied string |
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
This SWI is used to read a split point by limiting to a given length. It is similar in function to the SWI Font_ScanString SWI.
Truncate a string with an ellipsis
| R0 | = | 4 (truncate string with ellipsis) |
| R1 | = | Pointer to string |
| R2 | = | Pointer to output buffer |
| R3 | = | Size of output buffer, or 0 to request size required |
| R4 | = | Maximum width in OS units |
| R0 | = | Size of buffer required |
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
This SWI is used to truncate a string by using an ellipsis character for the currently selected alphabet, or three full stops. If the string fits within the size specified, no ellipsis will be added.