private void drawGlyph(byte glyphPixels[], int x, int y, int width,
			int height, int colour) {
		int outputPosition = x + y * DrawingArea.width;
		int outputWidth = DrawingArea.width - width;
		int inputWidth = 0;
		int inputPosition = 0;
		
		/*
		 * Calculate the height of the glyph.
		 */
		if (y < DrawingArea.topY) {
			int size = DrawingArea.topY - y;
			height -= size;
			y = DrawingArea.topY;
			inputPosition += size * width;
			outputPosition += size * DrawingArea.width;
		}
		if (y + height >= DrawingArea.bottomY) {
			height -= ((y + height) - DrawingArea.bottomY) + 1;
		}
		
		/*
		 * Calculate the width of the glyph.
		 */
		if (x < DrawingArea.topX) {
			int size = DrawingArea.topX - x;
			width -= size;
			x = DrawingArea.topX;
			inputPosition += size;
			outputPosition += size;
			inputWidth += size;
			outputWidth += size;
		}
		if (x + width >= DrawingArea.bottomX) {
			int size = ((x + width) - DrawingArea.bottomX) + 1;
			width -= size;
			inputWidth += size;
			outputWidth += size;
		}
		
		/*
		 * If the glyph is a valid size then render it.
		 */
		if (width > 0 && height > 0) {
			render(glyphPixels, inputPosition, inputWidth, DrawingArea.pixels, outputPosition,
					outputWidth, width, height, colour);
		}
	}