Font awesome with raphael js -


What do I want to do is create a simple circle with Facebook's 'F' (this will also be used for other similar) Cases) The symbol of 'F' will be produced.

I have defined the font family (and have not worked) as a CSS and / or Raphael attribute.

The code is as follows:

HTML

  & lt; Div id = 'share-facebook' & gt; & Lt; / Div & gt;  

CSS

  # share-facebook {font-family: FontAwesome; }  

javascript

  var canvas = Rafael ('share-facebook', 100, 100); Var facebookWrapper = canvas.circle (50,50,50); FacebookWrapper.attr ('Filling', '# 3E3E3'); FacebookWrapper.attr ('stroke', 'any'); Var facebookText = canvas.text (50,50, '& # xf09a'); FacebookText.attr ('font-size', 40); FacebookText.attr ('Filling', '#FFF'); FacebookText.attr ('font-family', 'FontAwesome');  

There is also a bela to make your life easier. I have seen the issue that Rapel has put the character inside a TSNN inside the text node and it can not be decoded. Anyone have an idea to overcome this idea?

use canvas.text (50,50, '\ Uf0 9a'); canvas.text (50,50, '& amp; # xf09a') instead of ; and it works


Comments

Popular posts from this blog

Removing From ArrayList, In Loop Based On It's Size, But Breaking After Remove Still Gives OutOfBounds -

c# - Reactive Extensions ControlScheduler -

java - Add color code support to a Bukkit plugin -