@meta2d/core 1.0.86 → 1.0.87
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.
- package/package.json +1 -1
- package/src/canvas/canvas.js +4 -0
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.js +15 -8
- package/src/core.js.map +1 -1
- package/src/pen/model.d.ts +2 -0
- package/src/pen/model.js +1 -0
- package/src/pen/model.js.map +1 -1
- package/src/pen/render.js +22 -2
- package/src/pen/render.js.map +1 -1
- package/src/pen/text.js +1 -1
- package/src/pen/text.js.map +1 -1
package/package.json
CHANGED
package/src/canvas/canvas.js
CHANGED
|
@@ -4025,6 +4025,7 @@ export class Canvas {
|
|
|
4025
4025
|
const scale = this.store.data.scale;
|
|
4026
4026
|
pen.calculative.lineWidth = pen.lineWidth * scale;
|
|
4027
4027
|
pen.calculative.fontSize = pen.fontSize * scale;
|
|
4028
|
+
pen.calculative.letterSpacing = (pen.letterSpacing || 0) * scale;
|
|
4028
4029
|
if (pen.fontSize < 1 && pen.fontSize > 0) {
|
|
4029
4030
|
pen.calculative.fontSize =
|
|
4030
4031
|
pen.fontSize * pen.calculative.worldRect.height;
|
|
@@ -6474,6 +6475,9 @@ export class Canvas {
|
|
|
6474
6475
|
}
|
|
6475
6476
|
style += `height:${height}px;`;
|
|
6476
6477
|
}
|
|
6478
|
+
if (pen.letterSpacing) {
|
|
6479
|
+
style += `letter-spacing:${pen.calculative.letterSpacing}px;`;
|
|
6480
|
+
}
|
|
6477
6481
|
let _textWidth = null;
|
|
6478
6482
|
if (pen.textWidth) {
|
|
6479
6483
|
_textWidth =
|