Closed gopalpradhan closed 10 years ago
i have the same problem, i understand that we need to manually add the desired ttf file, but where ? and how to load it ?
thx for your great job anyway
tried to correct it with my last commit (PR #55 )
@gopalpradhan
ctx.fillStyle = "#ff00ff"; ctx.font = "50pt arial"; ctx.fillText("hello", 100, 100);
@come Thanks again for your PR!
Fixed in #56
Hi,
I'm trying the following code. All drawing ops like fillRect, beizerCurveTo, quadraticCurveTo etc works fine. But unable to render any text on the canvas. Am I missing something ?
var context =canvas.getContext("2d"); context.fillStyle = "blue"; context.font = "16px LiberationMono-Regular.ttf"; context.fillRect(25,25,100,100); context.clearRect(45,45,60,60); context.strokeRect(50,50,50,50); context.fillStyle = "cyan";
context.fillText("Hello World", 45, 45);