Skip to content

Instantly share code, notes, and snippets.

@omniosi
Last active August 29, 2015 13:56
Show Gist options
  • Save omniosi/9330477 to your computer and use it in GitHub Desktop.
Save omniosi/9330477 to your computer and use it in GitHub Desktop.
Illustrator SVG converted with http://readysetraphael.com/ to RaphaelJS with notes on how to make the file work correctly.
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="rsr"></div>
</body>
</html>
// Illustrator SVG converted with http://readysetraphael.com/ NOTE: need to update numbers and string values to make the conversion work. also create the #rsr div in the html
var rsr = Raphael('rsr', 71, 20);
var path_a = rsr.path("M30.4,8.2h-3.5V4.9h3.3c0.6,0,1.9,0.3,1.9,1.7C32.1,7.6,31.5,8.2,30.4,8.2 M29.9,12.3c0.2,0.3,3.7,7.3,3.7,7.3H56v-4.4H44.9 v-2.9h8V8.2h-8V4.9h9.2c2,3.4,4.4,7.6,4.4,7.6v7.2H64v-7.2c0.1-0.1,7-12.1,7-12.1h-6.2c0,0-3.1,6.3-3.5,7.2 c-0.5-0.9-3.5-7.2-3.5-7.2H39.1v16.6c-1.5-2.5-3.5-6-3.7-6.3c1.7-0.8,2.8-2.6,2.8-4.8c0-1.8-0.7-3.3-2.2-4.3 c-1.2-0.8-2.8-1.3-4.7-1.3h-9.9v19.2h5.4v-7.3L29.9,12.3z");
path_a.attr({'stroke-width': 0,'stroke-opacity': 0, fill: '#000000'}).data('id', 'path_a');
var path_b = rsr.path("M0,10c0,5.8,4.5,10,10.7,10c0.9,0,3.6-0.2,5.5-2c0,0.6,0,1.6,0,1.6h4.2V8.2h-9.1v4.1H15c-0.4,1.5-2.1,2.9-4.4,2.9 C7.2,15.3,6,12.6,6,10c0-2.5,1.2-5.3,4.6-5.3c1.7,0,3.1,0.6,3.6,1.6l0.1,0.2h6.1l-0.1-0.4c-1-4.5-5.8-6.1-9.6-6.1C4.5,0,0,4.2,0,10");
path_b.attr({'stroke-width': 0,'stroke-opacity': 0, fill: '#000000'}).data('id', 'path_b');
//var rsrGroups = [];
// combine the shapes into a set to effect compound paths as a whole
var logo = rsr.set();
logo.push(path_a, path_b);
logo.attr({fill:'#f54029'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment