customized-fabric 1.6.3 → 1.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,6 +23,7 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
23
23
  textAlign: "center",
24
24
  objectCaching: false,
25
25
  ...text,
26
+ fontFamily: "",
26
27
  });
27
28
  const group = new fabric_1.fabric.Group([this.rectObject, this.textObject]);
28
29
  this.set(group);
@@ -58,9 +59,7 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
58
59
  if (options?.hideStroke) {
59
60
  this.rectObject?.set({ strokeWidth: 0 });
60
61
  }
61
- if (options?.fontUrl) {
62
- (0, utils_1.loadFontFromUrl)(options?.fontUrl, text?.fontFamily ?? "");
63
- }
62
+ this.setFontFamily(text?.fontFamily ?? "", options?.fontUrl);
64
63
  }
65
64
  this.fire("scaling");
66
65
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",