Large fonts and the text cursor

by Richard Russell, December 2007

BBC BASIC for Windows normally displays a text cursor (caret), by default consisting of a flashing underscore, the main purpose of which is to indicate to the user where a character typed at the keyboard will appear (for example when entering information in response to an INPUT statement). The cursor can be disabled using the OFF statement, and it is automatically hidden in the VDU 5 (text at graphics cursor) mode.

However, a text cursor is not displayed if you select a font size with a character height of more than about 32 pixels (corresponding to about 24 points at 96 DPI). If you need to display a cursor with large fonts you can still do so by selecting a full-height 'block' cursor as follows:

        *FONT Courier New,28
        VDU 23,0,10;0;0;0;

Alternatively you can select a 'vertical line' cursor (which is more suitable for a proportional-spaced font):

        *FONT Arial,28
        VDU 23,0,18,2,0;0;0;23,0,10;0;0;0;

Note: To permit satisfactory input editing when using a proportional-spaced font you should use the FNpsinput routine (which can be found here) rather than the INPUT statement.