This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<title>Flatten.js, General SVG Flattener</title> | |
<head> | |
<script> | |
/* | |
Random path and shape generator, flattener test base: http://jsfiddle.net/xqq5w/embedded/result/ | |
Basic usage example: http://jsfiddle.net/Nv78L/3/embedded/result/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
##################### | |
# Inkscape Install # | |
##################### | |
# Script installs Inkscape from source for Amazon AMI Instance (CentOS/REHL) | |
# | |
# Works as of 01/03/2016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const canvas = fabric.createCanvasForNode(width, height); | |
canvas.contextCache.constructor.prototype.getFontSize = function getFontSize() { | |
return 1 * this.font.split('-')[1]; | |
}; | |
canvas.contextCache.constructor.prototype.getFontFamily = function getFontFamily() { | |
return this.font.split('-')[0] | |
}; |