FillText no longer works? (FireFox 27.0.1)

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:

Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » FillText no longer works? (FireFox 27.0.1)

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录