Skip to content

Instantly share code, notes, and snippets.

View ddanninger's full-sized avatar

Dominik Danninger ddanninger

View GitHub Profile
@ddanninger
ddanninger / flatten.js
Created March 9, 2019 11:38 — forked from alexjlockwood/flatten.js
Flatten.js, general SVG flattener. Flattens transformations of SVG shapes and paths. All shapes and path commands are supported.
<!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/
@ddanninger
ddanninger / Inkscape_install.sh
Created February 27, 2020 17:34 — forked from robhemsley/Inkscape_install.sh
AWS Linux AMI - Inkscape Install
#!/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 / rendercard.js
Created June 30, 2020 18:33 — forked from lukasvan3l/rendercard.js
Fabric.js + Opentype.js for pixelperfect valentine cards
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]
};