开发者

Can I render special characters using SVG in a browser

I am building a graph using the SVG library RaphealJS. I would like to label one of the axes as F° Can special characters be included in SVG text elements?

I would like to be able to do something like the 开发者_开发知识库following:

var paper = Raphael(10, 50, 320, 200);
paper.text(10, 10, 'F°')


Turns out you can simply add the character explicitly. There's no need to special encoding. The character is option+0 option+shift+8 on my mac, and it displays correctly in SVG.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜