canvasへテキストを書き出す。
Safari : strokeText()
Firefox : mozDrawText()
キャンバスサポートなし


<script type="text/javascript">
function doStrokeText(){
	var canvas=document.getElementById('output')
	var cont=canvas.getContext('2d');
	cont.strokeText('hello, world!', 50,100);
}

function doMozDrawText(){
	var canvas=document.getElementById('output')
	var cont=canvas.getContext('2d');
	cont.translate(10,50);
	cont.fillStyle="Red";
	cont.fillRect(10,80,200,120);
	cont.mozDrawText('hello, world!');
}
</script>

BACK