开发者

Can I render special characters using SVG in a browser

开发者 https://www.devze.com 2023-02-20 22:17 出处:网络
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 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

精彩评论

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