From 054733fa0ebafe62b3c5da00c7c1f16d37326eba Mon Sep 17 00:00:00 2001
From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com>
Date: Wed, 4 Jun 2025 01:14:01 -0600
Subject: [PATCH 1/3] temp stuff to see if this idea even works
---
package.json | 1 +
src/helper/tools/sussy-tool.js | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index f0a9319982..cad026c2be 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"lodash.bindall": "4.4.0",
"lodash.omit": "4.5.0",
"minilog": "3.1.0",
+ "opentype.js": "^1.3.4",
"parse-color": "1.0.0",
"prop-types": "^15.5.10"
},
diff --git a/src/helper/tools/sussy-tool.js b/src/helper/tools/sussy-tool.js
index 8aabf39545..a3481e2087 100644
--- a/src/helper/tools/sussy-tool.js
+++ b/src/helper/tools/sussy-tool.js
@@ -7,6 +7,8 @@ import BoundingBoxTool from '../selection-tools/bounding-box-tool';
import NudgeTool from '../selection-tools/nudge-tool';
import { selectablePaths } from '../selectable-shapes';
+import opentype from 'opentype.js'; // temp
+
/**
* Tool for drawing sussys.
*/
@@ -49,6 +51,8 @@ class SussyTool extends paper.Tool {
this.active = false;
this.shape = "smile";
+
+ this.path = null; // temp
}
getHitOptions() {
return {
@@ -88,6 +92,18 @@ class SussyTool extends paper.Tool {
this.isBoundingBoxMode = false;
clearSelection(this.clearSelectedItems);
}
+
+ // temp
+ if (!this.path) {
+ // Replace the string with some font URL, i used a default font but idk if i should include it in the repo
+ // note that googlefonts uses woff2 which isnt supported in opentype
+ // opentype.load("", (err, font) => {
+ // if (err) return console.error(err);
+ // console.log(font);
+ // const path = font.getPath("Testtest", 0, 0, 16);
+ // this.path = path.toPathData();
+ // });
+ }
}
handleMouseDrag(event) {
if (event.event.button > 0 || !this.active) return; // only first mouse button
@@ -108,7 +124,7 @@ class SussyTool extends paper.Tool {
}
const path = selectablePaths[this.shape];
- this.sussy = new paper.CompoundPath(path);
+ this.sussy = new paper.CompoundPath(this.path || path); // temp this.path check
this.sussy.bounds = sussy;
if (event.modifiers.alt) {
this.sussy.position = event.downPoint;
From bfbe31344ec16d5c0bd7252be83b3ab381f074d1 Mon Sep 17 00:00:00 2001
From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com>
Date: Wed, 4 Jun 2025 08:18:26 -0600
Subject: [PATCH 2/3] revert sussy tool test
---
src/helper/tools/sussy-tool.js | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/src/helper/tools/sussy-tool.js b/src/helper/tools/sussy-tool.js
index a3481e2087..8aabf39545 100644
--- a/src/helper/tools/sussy-tool.js
+++ b/src/helper/tools/sussy-tool.js
@@ -7,8 +7,6 @@ import BoundingBoxTool from '../selection-tools/bounding-box-tool';
import NudgeTool from '../selection-tools/nudge-tool';
import { selectablePaths } from '../selectable-shapes';
-import opentype from 'opentype.js'; // temp
-
/**
* Tool for drawing sussys.
*/
@@ -51,8 +49,6 @@ class SussyTool extends paper.Tool {
this.active = false;
this.shape = "smile";
-
- this.path = null; // temp
}
getHitOptions() {
return {
@@ -92,18 +88,6 @@ class SussyTool extends paper.Tool {
this.isBoundingBoxMode = false;
clearSelection(this.clearSelectedItems);
}
-
- // temp
- if (!this.path) {
- // Replace the string with some font URL, i used a default font but idk if i should include it in the repo
- // note that googlefonts uses woff2 which isnt supported in opentype
- // opentype.load("", (err, font) => {
- // if (err) return console.error(err);
- // console.log(font);
- // const path = font.getPath("Testtest", 0, 0, 16);
- // this.path = path.toPathData();
- // });
- }
}
handleMouseDrag(event) {
if (event.event.button > 0 || !this.active) return; // only first mouse button
@@ -124,7 +108,7 @@ class SussyTool extends paper.Tool {
}
const path = selectablePaths[this.shape];
- this.sussy = new paper.CompoundPath(this.path || path); // temp this.path check
+ this.sussy = new paper.CompoundPath(path);
this.sussy.bounds = sussy;
if (event.modifiers.alt) {
this.sussy.position = event.downPoint;
From d3aaeb738c6bbf80f52d7d7004cc7f2f1424f482 Mon Sep 17 00:00:00 2001
From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com>
Date: Sat, 6 Sep 2025 18:14:58 -0600
Subject: [PATCH 3/3] add button (nonfunctional)
---
.../mode-tools/icons/text-to-shapes.svg | 26 +++++++++++++++++++
src/components/mode-tools/mode-tools.jsx | 8 ++++++
2 files changed, 34 insertions(+)
create mode 100644 src/components/mode-tools/icons/text-to-shapes.svg
diff --git a/src/components/mode-tools/icons/text-to-shapes.svg b/src/components/mode-tools/icons/text-to-shapes.svg
new file mode 100644
index 0000000000..138d7ecb39
--- /dev/null
+++ b/src/components/mode-tools/icons/text-to-shapes.svg
@@ -0,0 +1,26 @@
+
+
\ No newline at end of file
diff --git a/src/components/mode-tools/mode-tools.jsx b/src/components/mode-tools/mode-tools.jsx
index 73d120148d..d1b3f7861d 100644
--- a/src/components/mode-tools/mode-tools.jsx
+++ b/src/components/mode-tools/mode-tools.jsx
@@ -57,6 +57,7 @@ import shapeFilterIcon from './icons/filter.svg';
import alignLeftIcon from './icons/alignLeft.svg';
import alignRightIcon from './icons/alignRight.svg';
import alignCenterIcon from './icons/alignCenter.svg';
+import textToShapesIcon from './icons/text-to-shapes.svg';
import bitBrushIcon from '../bit-brush-mode/brush.svg';
import bitEraserIcon from '../bit-eraser-mode/eraser.svg';
import bitLineIcon from '../bit-line-mode/line.svg';
@@ -784,6 +785,13 @@ const ModeToolsComponent = props => {
onClick={props.onTextAlignRight}
/>
+
+
+
);
case Modes.BIT_RECT: