@shotstack/shotstack-canvas 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,7 +48,7 @@ var CANVAS_CONFIG = {
48
48
  fontFamily: "Roboto",
49
49
  fontSize: 48,
50
50
  color: "#000000",
51
- textAlign: "left"
51
+ textAlign: "center"
52
52
  },
53
53
  LIMITS: {
54
54
  minWidth: 1,
@@ -2119,7 +2119,10 @@ async function createTextEngine(opts = {}) {
2119
2119
  },
2120
2120
  stroke: asset.stroke,
2121
2121
  shadow: asset.shadow,
2122
- align: asset.align ?? { horizontal: "left", vertical: "middle" },
2122
+ align: {
2123
+ horizontal: asset.align?.horizontal ?? "center",
2124
+ vertical: asset.align?.vertical ?? "middle"
2125
+ },
2123
2126
  background: asset.background,
2124
2127
  glyphPathProvider: (gid) => fonts.glyphPath(desc, gid),
2125
2128
  getUnitsPerEm: () => fonts.getUnitsPerEm(desc)
@@ -6,7 +6,7 @@ declare const CANVAS_CONFIG: {
6
6
  fontFamily: string;
7
7
  fontSize: number;
8
8
  color: string;
9
- textAlign: "left";
9
+ textAlign: "center";
10
10
  };
11
11
  LIMITS: {
12
12
  minWidth: number;
@@ -6,7 +6,7 @@ declare const CANVAS_CONFIG: {
6
6
  fontFamily: string;
7
7
  fontSize: number;
8
8
  color: string;
9
- textAlign: "left";
9
+ textAlign: "center";
10
10
  };
11
11
  LIMITS: {
12
12
  minWidth: number;
@@ -10,7 +10,7 @@ var CANVAS_CONFIG = {
10
10
  fontFamily: "Roboto",
11
11
  fontSize: 48,
12
12
  color: "#000000",
13
- textAlign: "left"
13
+ textAlign: "center"
14
14
  },
15
15
  LIMITS: {
16
16
  minWidth: 1,
@@ -2080,7 +2080,10 @@ async function createTextEngine(opts = {}) {
2080
2080
  },
2081
2081
  stroke: asset.stroke,
2082
2082
  shadow: asset.shadow,
2083
- align: asset.align ?? { horizontal: "left", vertical: "middle" },
2083
+ align: {
2084
+ horizontal: asset.align?.horizontal ?? "center",
2085
+ vertical: asset.align?.vertical ?? "middle"
2086
+ },
2084
2087
  background: asset.background,
2085
2088
  glyphPathProvider: (gid) => fonts.glyphPath(desc, gid),
2086
2089
  getUnitsPerEm: () => fonts.getUnitsPerEm(desc)
@@ -6,7 +6,7 @@ declare const CANVAS_CONFIG: {
6
6
  fontFamily: string;
7
7
  fontSize: number;
8
8
  color: string;
9
- textAlign: "left";
9
+ textAlign: "center";
10
10
  };
11
11
  LIMITS: {
12
12
  minWidth: number;
package/dist/entry.web.js CHANGED
@@ -14,7 +14,7 @@ var CANVAS_CONFIG = {
14
14
  fontFamily: "Roboto",
15
15
  fontSize: 48,
16
16
  color: "#000000",
17
- textAlign: "left"
17
+ textAlign: "center"
18
18
  },
19
19
  LIMITS: {
20
20
  minWidth: 1,
@@ -1801,7 +1801,10 @@ async function createTextEngine(opts = {}) {
1801
1801
  },
1802
1802
  stroke: asset.stroke,
1803
1803
  shadow: asset.shadow,
1804
- align: asset.align ?? { horizontal: "center", vertical: "middle" },
1804
+ align: {
1805
+ horizontal: asset.align?.horizontal ?? "center",
1806
+ vertical: asset.align?.vertical ?? "middle"
1807
+ },
1805
1808
  background: asset.background,
1806
1809
  glyphPathProvider: (gid) => fonts.glyphPath(desc, gid),
1807
1810
  getUnitsPerEm: () => fonts.getUnitsPerEm(desc)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/shotstack-canvas",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Text layout & animation engine (HarfBuzz) for Node & Web - fully self-contained.",
5
5
  "type": "module",
6
6
  "main": "./dist/entry.node.cjs",