Amiga Fonts
Amiga text is drawn from bitmap fonts. A font is a block of glyph bitmaps, the system default being Topaz at 8×8 pixels, and the OS text routines copy those glyphs into a bitplane rastport a character at a time. Fonts may be fixed width, where every glyph is the same size, or proportional, where each glyph has its own width.
Overview
A font on the Amiga is bitmap glyph data, not outlines or vectors. Every character is a small monochrome image, and displaying text means blitting each glyph's pixels into the screen's bitplanes. The built-in Topaz font is 8 pixels wide and 8 tall; other disk fonts come in many sizes. The OS keeps the glyphs together in one strip and uses a table of offsets to find each one.
| Property | Value |
|---|---|
| Glyph form | Monochrome bitmap |
| Default font | Topaz, 8 × 8 |
| Widths | Fixed or proportional |
| Storage | One-bit rows, all glyphs in one strip |
| Drawn by | OS text routines, into a rastport |
Bitmap glyph data
Each glyph is a rectangle of pixels stored as rows of bits, one bit per pixel, a set bit being ink. The glyphs for a whole font are not kept as separate small images. Instead they are laid side by side into one wide one-bit bitmap, the font's character data, so a row of that bitmap holds the same scanline of every glyph in sequence. To draw a character the routine reads the correct horizontal slice of this strip for each of its rows.
Because the glyph data is a plain one-bit bitmap, the blitter can copy it into a bitplane directly, and the same data can be scaled or styled (bold, italic, underline) by simple transforms as it is drawn.
The font structure
A font is described by a TextFont structure that the OS reads. It records the height in scanlines, the range of character codes present, a pointer to the one-bit glyph strip, and the tables that locate each glyph within that strip. Two parallel tables give, for every character, its starting bit position in the strip and its width.
| Field | Meaning |
|---|---|
| Height | Glyph height in scanlines |
| First / last char | Range of codes the font defines |
| Character data | Pointer to the one-bit glyph strip |
| Char location table | Per glyph: bit offset into the strip and pixel width |
| Baseline | Scanline used to align glyphs on a line |
Fixed and proportional
In a fixed-width font every glyph occupies the same number of pixels, so text lays out on an even grid and cursor maths is trivial; Topaz is fixed at 8 pixels. In a proportional font each glyph has its own width, taken from the character location table, so an i is narrow and an m is wide, and the cursor advances by each glyph's own width.
| Kind | Advance | Example |
|---|---|---|
| Fixed | Same for every glyph | Topaz |
| Proportional | Per-glyph width from the table | Helvetica bitmap |
Both kinds store the same sort of one-bit glyph strip; the only difference is whether the width table holds one repeated value or a different width for each character.
Rendering into a rastport
Text is drawn into a rastport, the OS structure that binds a set of bitplanes with a drawing pen. When the program prints a string, the graphics library walks each character, looks up its slice of the glyph strip, and blits those pixels into the rastport's bitplanes at the pen position, then advances the pen by the glyph's width. Because it writes into ordinary bitplanes, text mixes freely with sprites, BOBs and playfield graphics on the same screen.
The pen selects which palette colour the set bits take, so the same monochrome glyph can be drawn in any colour, and drawing styles apply as the glyph is copied.