Commit 7cd69d39 authored by 张九刚's avatar 张九刚

修改字体取整

parent 7e486f92
......@@ -199,7 +199,8 @@ async function execute(psdFile, options) {
properties.attrs.text = fontInfo.textValue;
const sizes = fontInfo.sizes();
const colors = fontInfo.colors();
properties.style.fontSize = sizes ? sizes[0] || 20 : 20;
let fsize = sizes ? sizes[0] || 20 : 20;
properties.style.fontSize = parseInt(fsize);//字体取整
let [r, g, b, a] = colors[0];
properties.style.color = `rgba(${r}, ${g}, ${b}, ${a / 255})`;
viewNode.nodeType = 'Label';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment