# Module `rastertext` - Support for drawing text onto a raster

Support for drawing text onto a raster.

## Index

- Constant `FONT.10X20` - 10-by-20 pixel bitmap font for use with
- Constant `FONT.6X13` - 6-by-13 pixel bitmap font for use with
- Process `draw.text` - Draw a string on a raster
- Function `measure.text` - Measure the dimensions of some text

## Declarations

### `text.occ`:33Function `measure.text`

`INT, INT FUNCTION measure.text (VAL []BYTE text, VAL []INT font)`

Measure the dimensions of some text. This will return the amount of space that the text will occupy when drawn using `draw.text` in the given font.

#### Parameters:

`VAL []BYTE` | `text` | String
`VAL []INT` | `font` | Font

#### Returns:

`INT` | `width`, `height` | Dimensions of the text in pixels

### `text.occ`:45Process `draw.text`

`PROC draw.text (VAL INT x, y, VAL []BYTE text, VAL []INT font, VAL INT colour, [][]INT raster)`

Draw a string on a raster.

#### Parameters:

`VAL INT` | `x`, `y` | Top left corner coordinates
`VAL []BYTE` | `text` | String to draw
`VAL []INT` | `font` | Font
`VAL INT` | `colour` | Colour
`[][]INT` | `raster` | Raster

### `font6x13.inc`:11Constant `FONT.6X13`

`VAL []INT FONT.6X13`

6-by-13 pixel bitmap font for use with `draw.text`. This is the X11 `6x13` font.

### `font10x20.inc`:11Constant `FONT.10X20`

`VAL []INT FONT.10X20`

10-by-20 pixel bitmap font for use with `draw.text`. This is the X11 `10x20` font.