I know about AMCAF, but the AMOS Pro manual suggests that there is built-in support for custom text fonts, and even supplies an editor for creating them. It only fails to mention how they're loaded.
Yes, the AMOS Pro Manual goes a bit off the rails at that point! It starts introducing the
Text instructions alongside the
Print instructions. Giving the impression that they can be freely mixed. They can't!
Print, the editor, and everything else that displays text in AMOS Pro uses the built-in 8x8 font. So if you could replace it (I haven't looked at the AMCAF instruction yet) you'd be stuck with your replacement font for everything. Which may or may not be desirable
.
Text uses any font you care to load. So it's much more flexible but very slow compared to the built-in font.
When AMOS Pro starts up (editor, interpreter or compiler) the
amos.library file is loaded and initialised. During that initialisation, AMOS opens a two-colour (single bitplane) screen and prints the Amiga's
topaz.font to it. It then copies the resulting bitmap to its own storage. It also uses a built-in set of graphics characters - this is the binary
+WFont.bin file included in the source distro. If you change the extension of that file you can load it into the 8x8 font editor. But it doesn't include graphics for all the ASCII characters, so it's the wrong overall size. So AMOS Pro has a ready-made bitmap of all the characters it uses. Which makes for fast drawing to any screen's bitplanes - it simply copies one 8x8 bitmap to the screen's bitplanes for each character.
What the manual also hints at, but doesn't explain fully, is that it provides a very rich set of control characters for handling text. In fact, AMOS Pro uses those control characters to do all its stuff internally. So when you use the
Hscroll and
Vscoll instructions, it just sends the appropriate control characters to its internal print engine. Many of these have equivalent reserved variables and instructions built-in to the language. For example,
Pen$,
Cdown$,
Border$, etc. Where possible, it's better to use the built-in instructions, both for clarity and interpretation speed. But the raw codes are useful in decoding what some of the system config strings are about, and for deciphering text files containing control codes (eg. files used in
Readtext and
Hypertext).
The Graphics Character Set is shown in the attached *.png file. Note that only the ASCII characters from $00 thru $1F and $80 thru $9F are replaced. All other characters print as normal. As characters $00 and $1B have special meaning, they can't be used. So characters $9D and $9E are used instead. This is highlighted in red in the attached piccie.
Note also that these will only work correctly for you if you have downloaded and installed the AMOS Pro V2.10 alpha release zip file available
here as the original V2.00 had some bad bugs in this area.
This is the full list:
Control Codes:
Chr$($07) | Clear to EOL |
Chr$($08) | Backspace |
Chr$($09) | Tab |
Chr$($0A) | New Line (=Cursor Down) |
Chr$($0C) | Home |
Chr$($0D) | Return (=Cursor to Start of Line) |
Chr$($10) | Scroll Current Line Left |
Chr$($11) | Scroll Window Left |
Chr$($12) | Scroll Current Line Right |
Chr$($13) | Scroll Window Right |
Chr$($14) | Insert Line, Scroll Lines Below Down |
Chr$($15) | Delete Line, Scroll Lines Above Down |
Chr$($16) | Insert Line, Scroll Lines Above Up |
Chr$($17) | Delete Line, Scroll Lines Below Up |
Chr$($18) | Cursor Home |
Chr$($19) | Clear Window |
Chr$($1A) | Clear Line |
Chr$($1B) | Escape - see below |
Chr$($1C) | Cursor Right |
Chr$($1D) | Cursor Left |
Chr$($1E) | Cursor Up |
Chr$($1F) | Cursor Down |
Character Codes used with Chr$($1B) (Escape):
"B" - Set Paper Colour.
Chr$($1B)+"B"+Chr$($30+ColourNumber)"C" - Cursor Off/On.
Chr$($1B)+"C0" = Cursor Off.
Chr$($1B)+"C1" = Cursor On.
"D" - Cursor Colour.
Chr$($1B)+"D"+Chr$($30+ColourNumber)"E" - Border.
Chr$($1B)+"E0" prefixes the text to be Bordered.
Chr$($1B)+"E"+Chr$($30+PatternNumber) suffixes it.
PatternNumber is from 1 to 16 but only 6 distinct patterns are available.
"I" - Inverse Off/On.
Chr$($1B)+"I0" = Inverse Off.
Chr$($1B)+"I1" = Inverse On.
"J" - Set active planes
Chr$($1B)+"J"+Chr$($30+PlanesBitMask) The bits in
PlanesBitMask turn individual BitPlanes On (
%1) or Off (
%0).
"K" - Turn Graphics Character Set Off/On.
Chr$($1B)+"K0" = Graphics Off.
Chr$($1B)+"K1" = Graphics On.
"M" - Memorise/Remember Cursor X/Y.
Chr$($1B)+"M0" = Memorise X.
Chr$($1B)+"M1" = Remember X.
Chr$($1B)+"M2" = Memorise Y.
Chr$($1B)+"M3" = Remember Y.
"N" - Move Cursor X.
Chr$($1B)+"N"+Chr$($80+DeltaX) DeltaX = distance to move.
"O" - Move Cursor Y.
Chr$($1B)+"O"+Chr$($80+DeltaY) DeltaY = distance to move.
"P" - Set Pen Colour.
Chr$($1B)+"P"+Chr$($30+ColourNumber)"Q" - Erase N Characters.
Chr$($1B)+"Q"+Chr$($30+NumberOfChars)"R" - Repeat Text N times.
Chr$($1B)+"R0"+Text$+Chr$($1B)+"R"+Chr$($30+Repeats) Text$ = text to Repeat.
Repeats = Number of Repeats.
"S" - Shade Off/On.
Chr$($1B)+"S0" = Shade Off.
Chr$($1B)+"S1" = Shade On.
"T" - Set Tab Stop.
Chr$($1B)+"T"+Chr$($30+Column) Column = Tab Stop Position.
"U" - Underline Off/On.
Chr$($1B)+"U0" = Underline Off.
Chr$($1B)+"U1" = Underline On.
"V" - Scroll Off/On.
Chr$($1B)+"V0" = Scroll Off.
Chr$($1B)+"V1" = Scroll On.
"W" - Set Writing Mode.
Chr$($1B)+"W"+Chr$($30+BitMap) Bitmap: Bits 0, 1 & 2 =
Mode: %000 = Replace
%001 = Or
%010 = Xor
%011 = And
%100 = Ignore
Bits 3 & 4 =
Affects: %00 = Text & Background
%01 = Background only
%10 = Text only
"X" - Set Cursor X.
Chr$($1B)+"X"+Chr$($30+XCoord)"Y" - Set Cursor Y.
Chr$($1B)+"Y"+Chr$($30+YCoord)"Z" - Store a Zone.
Chr$($1B)+"Z0" prefixes the text to be Zoned.
Chr$($1B)+"Z"+Chr$($30+ZoneNumber) suffixes it.
ZoneNumber must be within the limits used in
Set Zone.