Skip to content

Instantly share code, notes, and snippets.

Avatar

Dominik Danninger ddanninger

View GitHub Profile
@ddanninger
ddanninger / rendercard.js
Created Jun 30, 2020 — forked from lukasvan3l/rendercard.js
Fabric.js + Opentype.js for pixelperfect valentine cards
View rendercard.js
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]
};
@ddanninger
ddanninger / Inkscape_install.sh
Created Feb 27, 2020 — forked from robhemsley/Inkscape_install.sh
AWS Linux AMI - Inkscape Install
View Inkscape_install.sh
#!/bin/bash
set -e
#####################
# Inkscape Install #
#####################
# Script installs Inkscape from source for Amazon AMI Instance (CentOS/REHL)
#
# Works as of 01/03/2016
@ddanninger
ddanninger / flatten.js
Created Mar 9, 2019 — forked from alexjlockwood/flatten.js
Flatten.js, general SVG flattener. Flattens transformations of SVG shapes and paths. All shapes and path commands are supported.
View flatten.js
<!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/