From 16c4e9ac99fcde5a20946d9405481e47717b884e Mon Sep 17 00:00:00 2001 From: Sarasa Kisaragi Date: Sun, 22 Mar 2020 00:42:30 +0800 Subject: [PATCH] fix a stupid code order problem --- lib/ch-to-path.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ch-to-path.js b/lib/ch-to-path.js index 14158e9..2dbd42d 100644 --- a/lib/ch-to-path.js +++ b/lib/ch-to-path.js @@ -151,8 +151,8 @@ module.exports = function (text, opts) { const top = opts.y + (height / 2); const path = glyph.getPath(left, top, fontSize); // Randomize path commands + path.commands.forEach(rndPathCmd); path.commands = randomizePathNodes(path.commands, opts); - // path.commands.forEach(rndPathCmd); // 由于截断了直线和曲线,如果逐点扰动,会造成畸形。考虑做成一个 option const pathData = path.toPathData();