<html>
<head>
<meta name="description" content="SVG Alphabets">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>SVG Letters</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="alphabetsController">
<div class="capital-letters-list" style="zoom:{{zoom}}">
<ng-template ng-repeat="letter in capitalLetters">
<svg viewBox="0 0 27 40">
<path d="{{letter.value}}"/>
</svg>
<div ng-if="($index % 4)===3"></div>
</ng-template>
</div>
<div class="floating-control">
<input type="range" ng-model="zoom" max="1.0" min="0.2" step="0.005">
</div>
</div>
</body>
</html>
console.clear();
var CAPITAL_LETTERS = {
"a": [
"M24,36",
"L24,20",
"L13,3",
"L3,20",
"L3,36",
"M3,20",
"L24,20"
],
"b": [
"M20,20",
"L20,3",
"L3,3",
"L3,36",
"L24,36",
"L24,20",
"L3,20"
],
"c": [
"M24,3",
"L3,3",
"L3,20",
"L3,36",
"L24,36"
],
"d": [
"M3,3",
"L24,3",
"L24,36",
"L3,36",
"M6,3",
"L6,36"
],
"e": [
"M24,3",
"L3,3",
"L3,36",
"L24,36",
"M3,20",
"L20,20"
],
"f": [
"M24,3",
"L3,3",
"L3,36",
"M3,20",
"L20,20"
],
"g": [
"M24,3",
"L3,3",
"L3,20",
"L3,36",
"L24,36",
"L24,20",
"L14,20"
],
"h": [
"M3,3",
"L3,36",
"M3,20",
"L24,20",
"M24,3",
"L24,36"
],
"i": [
"M3,3",
"L24,3",
"M3,36",
"L24,36",
"M13,3",
"L13,36"
],
"j": [
"M3,3",
"L24,3",
"M20,3",
"L20,36",
"L3,36",
"L3,25"
],
"k": [
"M3,3",
"L3,36",
"M18,3",
"L3,20",
"L18,36"
],
"l": [
"M3,3",
"L3,36",
"L24,36"
],
"m": [
"M3,36",
"L3,3",
"L14,20",
"L24,3",
"L24,36"
],
"n": [
"M3,36",
"L3,3",
"L24,36",
"L24,3"
],
"o": [
"M3,3",
"L3,36",
"L24,36",
"L24,3",
"L3,3"
],
"p": [
"M3,20",
"L20,20",
"L20,3",
"L3,3",
"L3,36"
],
"q": [
"M3,3",
"L3,36",
"L24,36",
"L24,3",
"L3,3",
"M16,25",
"L25,38"
],
"r": [
"M3,20",
"L20,20",
"L20,3",
"L3,3",
"L3,36",
"M16,20",
"L22,36"
],
"s": [
"M24,3",
"L3,3",
"L3,20",
"L24,20",
"L24,36",
"L3,36"
],
"t": [
"M3,3",
"L24,3",
"M14,3",
"L14,36"
],
"u": [
"M3,3",
"L3,36",
"L24,36",
"L24,3"
],
"v": [
"M3,3",
"L14,36",
"L24,3"
],
"w": [
"M3,3",
"L5,36",
"L14,10",
"L22,36",
"L24,3"
],
"x": [
"M3,3",
"L24,36",
"M3,36",
"L24,3"
// A
],
"y": [
"M3,3",
"L14,20",
"L24,3",
"M14,20",
"L14,36"
],
"z": [
"M3,3",
"L24,3",
"L3,36",
"L24,36"
]
};
function obToList(ob){
return Object.keys(ob).map(key=>{
return {
key:key,
value: ob[key].join('')
};
});
}
var myApp = angular.module('myApp', []);
myApp.controller('alphabetsController',['$scope', function($scope){
$scope.capitalLetters = obToList(CAPITAL_LETTERS);
$scope.zoom = 0.5;
}]);
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |