@leafer-ui/text 1.6.2 → 1.6.3

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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/TextRows.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/text",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "@leafer-ui/text",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,10 +22,10 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.6.2"
25
+ "@leafer/core": "1.6.3"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.6.2",
29
- "@leafer-ui/interface": "1.6.2"
28
+ "@leafer/interface": "1.6.3",
29
+ "@leafer-ui/interface": "1.6.3"
30
30
  }
31
31
  }
package/src/TextRows.ts CHANGED
@@ -36,6 +36,8 @@ export function createRows(drawData: ITextDrawData, content: string, style: ITex
36
36
  startCharSize = charWidth = charSize = wordWidth = rowWidth = 0
37
37
  word = { data: [] }, row = { words: [] }
38
38
 
39
+ if (__letterSpacing) content = [...content] as any // 防止切分表情等多个字符组成的字符,转成数组字符是最安全的
40
+
39
41
  for (let i = 0, len = content.length; i < len; i++) {
40
42
 
41
43
  char = content[i]