Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support download as SVG #5

Open
diogocapela opened this issue Aug 7, 2023 · 1 comment
Open

Support download as SVG #5

diogocapela opened this issue Aug 7, 2023 · 1 comment
Labels
feature New feature or request

Comments

@diogocapela
Copy link
Owner

Do we plan to support export/download as SVG?

@diogocapela diogocapela added the feature New feature or request label Aug 7, 2023
@folknor
Copy link

folknor commented Aug 8, 2023

I use this to generate SVG from text: https://gist.github.com/folknor/da97a716bd77b1d2f12f404e19601e10
It's a fork of https://github.com/shrhdk/text-to-svg/ with just minor minor changes, though I can't remember which changes now it is too long ago.

I use the latest opentype.js release.

Here is how I use it from my code:

			var opts = {
				x: coords.adresse[0] + aX,
				y: coords.adresse[1] + aY,
				fontSize: 100,
				attributes: { fill: "black", stroke: "", id: "adresse" }
			}
			var add = ttSVG.getSVGAndMetrics("Text goes here", opts)
			fabric.loadSVGFromString(add.svg, kjorPreviewJobb, addToPreviewGroup)

I realise you dont use fabricjs but maybe the code is helpful anyway :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants