mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2025-10-13 10:38:33 +00:00
修复 文本图层 进行矩阵缩放后字体显示不正确的问题
This commit is contained in:
8
psd2ui-tools/dist/index.js
vendored
8
psd2ui-tools/dist/index.js
vendored
@@ -1549,7 +1549,13 @@
|
||||
}
|
||||
}
|
||||
this.text = textSource.text;
|
||||
this.fontSize = style.fontSize;
|
||||
// 可能会对文本图层进行缩放,这里计算缩放之后的时机字体大小
|
||||
if (Math.abs(1 - textSource.transform[0]) > 0.001) {
|
||||
this.fontSize = Math.round(style.fontSize * textSource.transform[0] * 100) / 100;
|
||||
}
|
||||
else {
|
||||
this.fontSize = style.fontSize;
|
||||
}
|
||||
this.offsetY = config.textOffsetY[this.fontSize] || config.textOffsetY["default"] || 0;
|
||||
this.parseSolidFill();
|
||||
this.parseStroke();
|
||||
|
Reference in New Issue
Block a user