added ability to draw text in graphics mode