Editor Fonts tab
The Editor Fonts tab can be found in the Options window.
BASin's editor can use other fonts if you wish, rather than the standard sinclair font. These fonts are any file (either a binary dump or a .bsc file) which holds 768 bytes. This data is then used to form the font used by the editor.
Fonts can be created and edited using the UDG Editor. They can also be loaded by your programs and used (with a little modification to the CHARS system variable) as the default font by BASIC.
Font Folder
BASin will, on startup and when the options window opens, search for fonts that can be used by the editor. BASin will search the folder specified here, and recurse any subdirectories in that folder. The list of fonts gathered will be used in the Font Filename option.
If no fonts can be found, the only option available to you will be the default Sinclair Font which is built into BASin and into the ROM.
Changing the Editor Font
Clicking the Font Filename list-box will bring up a small tree-view of all the folders in the Font Folder, and all the fonts found in them. Folders with no fonts will not be shown. You can scroll through the list and find a font which you like the look of, and select it to activate it.
You can get a preview image of your font at the bottom of the window. This will show all 96 characters used in the character set. As you can see, some fonts are not really suitable for use in the editor, but will look very nice in the right context - perhaps a game.
Syntax Highlighting
As you work in BASin, with Syntax highlighting enabled you will notice that some words are coloured differently. This is more than just cosmetic - you can identify errors (especially with variables) in your code quite easily this way.
You can enable or disable syntax highlighting with the checkbox below the fonts list. Setting the options opens a new window:
The options here are applicable for each element that you can highlight. The checkbox next to each item can turn on or off highlighting for that element, and the colour palette below chooses the colour you want for that item. You can also choose for it to be either bold-faced or Italicised.
The list contains these items:
- Keywords - Any reserved word used by BASIC, such as PRINT, LET, GO TO etc.
- Functions - User defined functions created with DEF FN and referenced throughout the program with the FN keyword.
- Comments - Any REM statement
- Symbols - Any symbol character - i.e., from ASCII 33, "!" character through to 127, the Copyright symbol.
- Variables - Variables that are valid, and have a corresponding entry in the VARS space in memory.
- Undefined Variables - Any variable name that has either no corresponding LET statement or whose LET statement has not yet been executed at runtime will be an invalid variable name.
- Numbers - Any digits (except line numbers).
- Line Numbers - Line numbers at the start of a line.
- Strings - All string literals - any string of any characters enclosed in quote marks.
- Editor Foreground - The colour use to render any non-highlighted text in the editor.
- Editor Background - The colour used to render the background (default grey) and also used as a reference colour for the darker line-number gutter.