Closed jwarby closed 9 years ago
This feature would allow a font other than FontAwesome to be used. This is desirable for a number of reasons:
This feature should be fairly easy to implement; there are two main changes that need to be addressed:
.fa fa-<icon name>
Suggested approach is thus:
specify a different font using a new font option, e.g.
font
$(...).awesomeCursor('some-icon', { font: 'MyAmazingIconFont' });
specify CSS class using a new cssClass option, which can be:
cssClass
'%s'
$(...).awesomeCursor('some-icon', { cssClass: 'fa fa-%s' });
$(...).awesomeCursor('some-icon', { cssClass: function(name) { return 'fa fa-' + name; } });
It may also be worth wrapping both of these new options in an object since they are so closely related:
$(...).awesomeCursor('some-icon', { font: { name: 'MyAmazingIconFont', cssClass: 'fa fa-%s' } });
However this is implemented, it will default to the usual FontAwesome-specific values. and will of course be overridable:
console.log($.fn.awesomeCursor.defaults); // ... // font: { // name: 'FontAwesome', // cssClass: 'fa fa-%s' // } // ...
This feature would allow a font other than FontAwesome to be used. This is desirable for a number of reasons:
This feature should be fairly easy to implement; there are two main changes that need to be addressed:
.fa fa-<icon name>
.Suggested approach is thus:
specify a different font using a new
font
option, e.g.specify CSS class using a new
cssClass
option, which can be:'%s'
will be the name of the icon, e.g.It may also be worth wrapping both of these new options in an object since they are so closely related:
However this is implemented, it will default to the usual FontAwesome-specific values. and will of course be overridable: