From 77281cc2570f83f3e026beb7e73251a5824eecb0 Mon Sep 17 00:00:00 2001 From: Jared Hughes Date: Sun, 2 Jan 2022 03:48:51 -0800 Subject: [PATCH] Prepare 0.3.0 --- README.md | 16 ++++++++-------- package-lock.json | 4 ++-- package.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index fdabb52..d65a4a1 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ Yes, other SVG to Desmos scripts exist, but this one is special because it: - operates directly in the browser - is optimized to create **short, fast** parametrics using polynomial arithmetic and Horner's method -- **is designed with SVG font files in mind** (though it should work for most SVG files; see the Limitations section below) +- handles SVG transforms and more (see the Limitations section below) +- handles font files (TTF, etc.) -## A few example font graphs +## A few example graphs +- [Circles Single](https://www.desmos.com/calculator/a889yoavht) - [Dancing Script](https://www.desmos.com/calculator/rtpmycwixz) - [Lobster Regular](https://www.desmos.com/calculator/29ozjnu3aw) -- [Devil Breeze](https://www.desmos.com/calculator/sjkcsnakab) -- [Nunito](https://www.desmos.com/calculator/nmgtmamleb) ## Why not use Desmos labels for fonts? @@ -52,10 +52,10 @@ General tips: ## Limitations -The conversion process for SVGs does not follow the full SVG specification (which includes transforms, view boxes, and more). It just looks for elements with a `d` attribute (such as ``) and injects those paths as a parametric. +The conversion process for SVGs works by using the [canvg](https://github.com/canvg/canvg) SVG renderer but swapping out a canvas context for a custom rendering canvas. In other words, it meets the full SVG spec, including transforms, colors, and more, with a few exceptions: That being said, this script lacks support for: -- colors -- arcs (the `A` and `a` commands) -- SVG transforms, etc. +- arcs and ellipses (I haven't gotten around to these) +- text and images embedded inside of SVGs +- path clipping (Very difficult to implement in Desmos) diff --git a/package-lock.json b/package-lock.json index 1fac21b..cab08a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "path2desmos", - "version": "0.0.1", + "version": "0.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "path2desmos", - "version": "0.0.1", + "version": "0.3.0", "license": "ISC", "dependencies": { "canvg": "^3.0.9", diff --git a/package.json b/package.json index b07fc67..140cb77 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "path2desmos", - "version": "0.0.1", - "description": "Convert SVG path to Desmos parametric", + "version": "0.3.0", + "description": "Convert SVGs and fonts to Desmos", "scripts": { "dev": "webpack --mode development --config config/webpack.config.js", "build": "webpack --mode production --config config/webpack.config.js"