This is a piece of HTML that demonstrates the problem:
canvas fillText()var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); context.font = "40px sans serif "; context.lineWidth = 3; context.strokeStyle = "blue"; context.strokeText("Hello World!", 40, 40); context.fillStyle = "black"; context.fillText("Hello World!", 40, 80);
While other browsers show both the outlined and solid text, FF27 does not render the text using fillText(). Any suggestions? Thanks.
I am unable to comment due to reputation limitations, but I am running into the same issue :(. Unable to draw filled text in Firefox 27.0.1 on Windows 7 Pro SP1. I tried changing the fillStyle property to ‘#000’, ‘#000000’, ‘black’, ‘rgb(0,0,0)’, ‘rgba(0,0,0,.8)’. I also attempted to use the deprecated functions ‘mozDrawText’ and ‘mozPathText’, both of which have been removed from the API. Please answer your post if you figure out a workaround. For now, I guess I will just call both strokeText and fillText with black, and hope nobody notices the hollow text in Firefox.
Just so you know, I reported this as a bug at: https://bugzilla.mozilla.org/show_bug.cgi?id=982837