From 14f0a53886a08fa51fbedbf1db576d5151cf2707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Sun, 19 Sep 2021 16:30:56 -0300 Subject: [PATCH 1/9] Add support to SVG paths with attribute fill-rule "evenodd" --- package-lock.json | 427 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 1 + src/index.js | 19 ++- 3 files changed, 420 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 84191ea..5ba3cbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -390,6 +390,11 @@ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" + }, "@types/minimist": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", @@ -425,11 +430,24 @@ "through": ">=2.2.7 <3" } }, + "abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" + }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + }, + "acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "requires": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } }, "acorn-jsx": { "version": "5.3.1", @@ -437,12 +455,25 @@ "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==" + }, "add-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", "dev": true }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -550,6 +581,11 @@ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -585,6 +621,11 @@ "fill-range": "^7.0.1" } }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -610,6 +651,11 @@ "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", "dev": true }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, "cachedir": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.2.0.tgz", @@ -818,6 +864,14 @@ "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", @@ -1160,6 +1214,26 @@ } } }, + "cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==" + }, + "cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "requires": { + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" + } + } + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -1190,6 +1264,16 @@ "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", "dev": true }, + "data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "requires": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + } + }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -1200,7 +1284,6 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, "requires": { "ms": "2.1.2" } @@ -1229,6 +1312,11 @@ } } }, + "decimal.js": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", + "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==" + }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -1238,8 +1326,7 @@ "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, "deep-strict-equal": { "version": "0.2.0", @@ -1259,6 +1346,11 @@ "strip-bom": "^4.0.0" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -1286,6 +1378,21 @@ "esutils": "^2.0.2" } }, + "domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "requires": { + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" + } + } + }, "dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -1343,6 +1450,60 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, "eslint": { "version": "7.27.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.27.0.tgz", @@ -1511,8 +1672,7 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { "version": "1.4.0", @@ -1557,8 +1717,7 @@ "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "expand-tilde": { "version": "2.0.2", @@ -1601,8 +1760,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "figures": { "version": "2.0.0", @@ -1723,6 +1881,16 @@ "signal-exit": "^3.0.2" } }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -2206,17 +2374,43 @@ "lru-cache": "^6.0.0" } }, + "html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "requires": { + "whatwg-encoding": "^1.0.5" + } + }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -2379,6 +2573,11 @@ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", "dev": true }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" + }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -2513,6 +2712,47 @@ "esprima": "^4.0.0" } }, + "jsdom": { + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "requires": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==" + } + } + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2659,8 +2899,7 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.clonedeep": { "version": "4.5.0", @@ -2910,6 +3149,19 @@ "picomatch": "^2.2.3" } }, + "mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" + }, + "mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "requires": { + "mime-db": "1.49.0" + } + }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -3105,8 +3357,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "mute-stream": { "version": "0.0.7", @@ -3184,6 +3435,11 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==" + }, "nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -3398,6 +3654,21 @@ "release-zalgo": "^1.0.0" } }, + "paper": { + "version": "0.12.15", + "resolved": "https://registry.npmjs.org/paper/-/paper-0.12.15.tgz", + "integrity": "sha512-9qqtcY+V0Sd2RTLZKh7rTfWDbhfitOrtq3kzgOufhGpuYpCUXM+3UIK61au14tI0F9NA4xSttDYfk376O50aPA==" + }, + "paper-jsdom": { + "version": "0.12.15", + "resolved": "https://registry.npmjs.org/paper-jsdom/-/paper-jsdom-0.12.15.tgz", + "integrity": "sha512-wYF2oAHPK+Ox/nkJqyNKOL9skWQQtJG0Vy0hSeVTXn5ta69yvq1Bv3JlFEivbb36ZhEkDaMHeTtaZ0AAlYFhjA==", + "requires": { + "jsdom": "^16.5.1", + "paper": "0.12.15", + "source-map-support": "^0.5.19" + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3431,6 +3702,11 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3578,11 +3854,15 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "q": { "version": "1.5.1", @@ -3914,14 +4194,21 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "requires": { + "xmlchars": "^2.2.0" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -4014,8 +4301,16 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } }, "spawn-wrap": { "version": "2.0.0", @@ -4185,6 +4480,11 @@ "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.0.tgz", "integrity": "sha512-8XoCZjKbP0fvJbDsm6KFxVau2N3SkWkMj8OniADm87q4OiFXk/gSgri5Uyr8hE1fQ9npI+9XzRlTUObgWmBBNw==" }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" + }, "table": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", @@ -4329,6 +4629,24 @@ "is-number": "^7.0.0" } }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + } + }, + "tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "requires": { + "punycode": "^2.1.1" + } + }, "trim-newlines": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", @@ -4381,8 +4699,7 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "uri-js": { "version": "4.4.1", @@ -4441,6 +4758,50 @@ } } }, + "w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "requires": { + "xml-name-validator": "^3.0.0" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" + }, + "whatwg-url": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "requires": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -4468,8 +4829,7 @@ "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" }, "wordwrap": { "version": "1.0.0", @@ -4545,6 +4905,21 @@ "typedarray-to-buffer": "^3.1.5" } }, + "ws": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", + "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==" + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 2d251f3..5247b5f 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "geometry-interfaces": "^1.1.4", "glob": "^7.1.6", "neatequal": "^1.0.0", + "paper-jsdom": "^0.12.15", "readable-stream": "^3.4.0", "sax": "^1.2.4", "svg-pathdata": "^6.0.0" diff --git a/src/index.js b/src/index.js index ae81060..0190a73 100755 --- a/src/index.js +++ b/src/index.js @@ -9,6 +9,15 @@ const Sax = require('sax'); const { SVGPathData } = require('svg-pathdata'); const svgShapesToPath = require('./svgshapes2svgpath'); const { Matrix } = require('./Matrix'); +const paper = require('paper'); + +// Transform fill-rule from evenodd to nonzero +function reorientPath(pathData) { + paper.setup('font-canvas'); + var path = new paper.CompoundPath(pathData); + path.reorient(); + return path.pathData; +} // Transform helpers (will move elsewhere later) function parseTransforms(value) { @@ -307,7 +316,15 @@ class SVGIcons2SVGFontStream extends Transform { tag.attributes.d && 'none' !== tag.attributes.fill ) { - glyph.paths.push(applyTransform(tag.attributes.d)); + //Found fill rule "evenodd" support + if ( + 'fill-rule' in tag.attributes && + 'evenodd' === tag.attributes['fill-rule'] + ) { + glyph.paths.push(applyTransform(reorientPath(tag.attributes.d))); + } else { + glyph.paths.push(applyTransform(tag.attributes.d)); + } } // According to http://www.w3.org/TR/SVG/painting.html#SpecifyingPaint From 0a833e630a9599f36b59375d6548d0ab43a7d10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Sun, 19 Sep 2021 17:01:20 -0300 Subject: [PATCH 2/9] Fix tests --- tests/expected/hiddenpathesicons.svg | 2 +- tests/expected/lotoficons.svg | 2 +- tests/results/hiddenpathesicons.svg | 2 +- tests/results/lotoficons.svg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/expected/hiddenpathesicons.svg b/tests/expected/hiddenpathesicons.svg index ae00f9b..bba059e 100644 --- a/tests/expected/hiddenpathesicons.svg +++ b/tests/expected/hiddenpathesicons.svg @@ -9,7 +9,7 @@ + horiz-adv-x="512" d="M9 386.181L503 100.973V123.819L9 409.027zM401.422 221.983L419.483 211.564C422.107 225.688 423.961 240.103 423.961 255C423.961 295.042 414.215 332.728 397.313 366.17L381.084 354.225C395.749 324.2 404.2 290.604 404.2 255C404.2 243.751 403.062 232.79 401.422 221.983zM175.046 352.642L325 462.942V353.8V266.018L345 254.615V353.8V502L156.447 363.409zM483.24 255C483.24 229.393 478.608 204.944 470.696 182.001L488.122 171.927C497.538 197.901 503 225.745 503 255C503 328.869 470.408 394.98 419 440.23L402.694 428.248C451.883 386.527 483.24 324.391 483.24 255zM426.45 105.642C419.06 97.171 411.282 89.048 402.695 81.752L419 69.77C427.973 77.682 436.116 86.461 443.874 95.588zM325 164.132V156.2V47.058L141.567 182.081L136.417 186H129.934H28V324H47.981L13.747 344H9V166H129.933L345 8V152.726z" /> diff --git a/tests/expected/lotoficons.svg b/tests/expected/lotoficons.svg index 17fdbc6..a126fa4 100644 --- a/tests/expected/lotoficons.svg +++ b/tests/expected/lotoficons.svg @@ -39,7 +39,7 @@ horiz-adv-x="150" d="M79.415 140C51.476 140 28.83 116.787 28.83 88.148C28.83 73.56 34.72 60.395 44.179 50.973L20 21.237C24.884 17.491 29.768 13.746 34.652 10L60.641 40.009C66.449 37.627 72.777 36.297 79.415 36.297C107.354 36.297 130 59.51 130 88.148C130 116.787 107.354 140 79.415 140zM79.415 127.037C100.369 127.037 117.354 109.627 117.354 88.148C117.354 66.67 100.369 49.26 79.415 49.26C58.461 49.26 41.477 66.67 41.477 88.148C41.477 109.627 58.461 127.037 79.415 127.037z" /> + horiz-adv-x="512" d="M9 386.181L503 100.973V123.819L9 409.027zM401.422 221.983L419.483 211.564C422.107 225.688 423.961 240.103 423.961 255C423.961 295.042 414.215 332.728 397.313 366.17L381.084 354.225C395.749 324.2 404.2 290.604 404.2 255C404.2 243.751 403.062 232.79 401.422 221.983zM175.046 352.642L325 462.942V353.8V266.018L345 254.615V353.8V502L156.447 363.409zM483.24 255C483.24 229.393 478.608 204.944 470.696 182.001L488.122 171.927C497.538 197.901 503 225.745 503 255C503 328.869 470.408 394.98 419 440.23L402.694 428.248C451.883 386.527 483.24 324.391 483.24 255zM426.45 105.642C419.06 97.171 411.282 89.048 402.695 81.752L419 69.77C427.973 77.682 436.116 86.461 443.874 95.588zM325 164.132V156.2V47.058L141.567 182.081L136.417 186H129.934H28V324H47.981L13.747 344H9V166H129.933L345 8V152.726z" /> diff --git a/tests/results/hiddenpathesicons.svg b/tests/results/hiddenpathesicons.svg index ae00f9b..bba059e 100644 --- a/tests/results/hiddenpathesicons.svg +++ b/tests/results/hiddenpathesicons.svg @@ -9,7 +9,7 @@ + horiz-adv-x="512" d="M9 386.181L503 100.973V123.819L9 409.027zM401.422 221.983L419.483 211.564C422.107 225.688 423.961 240.103 423.961 255C423.961 295.042 414.215 332.728 397.313 366.17L381.084 354.225C395.749 324.2 404.2 290.604 404.2 255C404.2 243.751 403.062 232.79 401.422 221.983zM175.046 352.642L325 462.942V353.8V266.018L345 254.615V353.8V502L156.447 363.409zM483.24 255C483.24 229.393 478.608 204.944 470.696 182.001L488.122 171.927C497.538 197.901 503 225.745 503 255C503 328.869 470.408 394.98 419 440.23L402.694 428.248C451.883 386.527 483.24 324.391 483.24 255zM426.45 105.642C419.06 97.171 411.282 89.048 402.695 81.752L419 69.77C427.973 77.682 436.116 86.461 443.874 95.588zM325 164.132V156.2V47.058L141.567 182.081L136.417 186H129.934H28V324H47.981L13.747 344H9V166H129.933L345 8V152.726z" /> diff --git a/tests/results/lotoficons.svg b/tests/results/lotoficons.svg index 17fdbc6..a126fa4 100644 --- a/tests/results/lotoficons.svg +++ b/tests/results/lotoficons.svg @@ -39,7 +39,7 @@ horiz-adv-x="150" d="M79.415 140C51.476 140 28.83 116.787 28.83 88.148C28.83 73.56 34.72 60.395 44.179 50.973L20 21.237C24.884 17.491 29.768 13.746 34.652 10L60.641 40.009C66.449 37.627 72.777 36.297 79.415 36.297C107.354 36.297 130 59.51 130 88.148C130 116.787 107.354 140 79.415 140zM79.415 127.037C100.369 127.037 117.354 109.627 117.354 88.148C117.354 66.67 100.369 49.26 79.415 49.26C58.461 49.26 41.477 66.67 41.477 88.148C41.477 109.627 58.461 127.037 79.415 127.037z" /> + horiz-adv-x="512" d="M9 386.181L503 100.973V123.819L9 409.027zM401.422 221.983L419.483 211.564C422.107 225.688 423.961 240.103 423.961 255C423.961 295.042 414.215 332.728 397.313 366.17L381.084 354.225C395.749 324.2 404.2 290.604 404.2 255C404.2 243.751 403.062 232.79 401.422 221.983zM175.046 352.642L325 462.942V353.8V266.018L345 254.615V353.8V502L156.447 363.409zM483.24 255C483.24 229.393 478.608 204.944 470.696 182.001L488.122 171.927C497.538 197.901 503 225.745 503 255C503 328.869 470.408 394.98 419 440.23L402.694 428.248C451.883 386.527 483.24 324.391 483.24 255zM426.45 105.642C419.06 97.171 411.282 89.048 402.695 81.752L419 69.77C427.973 77.682 436.116 86.461 443.874 95.588zM325 164.132V156.2V47.058L141.567 182.081L136.417 186H129.934H28V324H47.981L13.747 344H9V166H129.933L345 8V152.726z" /> From 784f53c37ab3ade58d78454d797557d9e84c3615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Mon, 20 Sep 2021 10:09:24 -0300 Subject: [PATCH 3/9] Ignore clipPath when rendering icons --- src/index.js | 3 +++ tests/expected/rendricons.svg | 2 +- tests/results/rendricons.svg | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 0190a73..90b6a97 100755 --- a/src/index.js +++ b/src/index.js @@ -80,6 +80,9 @@ function tagShouldRender(curTag, parents) { return true; } } + if ('clipPath' === tag.name) { + return true; + } return false; }); } diff --git a/tests/expected/rendricons.svg b/tests/expected/rendricons.svg index 8aac3aa..6829851 100644 --- a/tests/expected/rendricons.svg +++ b/tests/expected/rendricons.svg @@ -9,7 +9,7 @@ + horiz-adv-x="150" d="M12.5 10C12.5 10 20.13 42.955 29.718 55.086C29.718 55.086 38.326 62.129 42.63 62.716C46.934 63.303 73.739 63.89 73.739 63.89L81.761 73.711H85.478L86.652 89.521L83.13 93.238L81.565 103.02L82.152 107.521H83.913C83.913 107.521 85.052 120.238 84.891 121.608C84.73 122.978 89.802 137.794 102.519 139.785C115.237 141.777 137.553 129.276 137.553 129.276L136.348 107.717L134 101.065L135.369 100.673C135.369 100.673 135.174 96.956 133.609 94.413C133.609 94.413 131.456 83.652 125.978 83.457L121.674 70.935L117.957 66.826L115.022 58.218L129.695 40.413L130.869 30.044C130.869 30.044 139.397 22.438 137.187 10.001H12.5z" /> diff --git a/tests/results/rendricons.svg b/tests/results/rendricons.svg index 8aac3aa..6829851 100644 --- a/tests/results/rendricons.svg +++ b/tests/results/rendricons.svg @@ -9,7 +9,7 @@ + horiz-adv-x="150" d="M12.5 10C12.5 10 20.13 42.955 29.718 55.086C29.718 55.086 38.326 62.129 42.63 62.716C46.934 63.303 73.739 63.89 73.739 63.89L81.761 73.711H85.478L86.652 89.521L83.13 93.238L81.565 103.02L82.152 107.521H83.913C83.913 107.521 85.052 120.238 84.891 121.608C84.73 122.978 89.802 137.794 102.519 139.785C115.237 141.777 137.553 129.276 137.553 129.276L136.348 107.717L134 101.065L135.369 100.673C135.369 100.673 135.174 96.956 133.609 94.413C133.609 94.413 131.456 83.652 125.978 83.457L121.674 70.935L117.957 66.826L115.022 58.218L129.695 40.413L130.869 30.044C130.869 30.044 139.397 22.438 137.187 10.001H12.5z" /> From 405c5e17b5ef28acf05718e9778fe04bca20f99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Mon, 20 Sep 2021 10:28:57 -0300 Subject: [PATCH 4/9] Ignore also defs --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 90b6a97..0339bfd 100755 --- a/src/index.js +++ b/src/index.js @@ -80,7 +80,7 @@ function tagShouldRender(curTag, parents) { return true; } } - if ('clipPath' === tag.name) { + if ('clipPath' === tag.name || 'defs' === tag.name) { return true; } return false; @@ -285,6 +285,11 @@ class SVGIcons2SVGFontStream extends Transform { this.log( `Found a clipPath element in the icon "${glyph.name}" the result may be different than expected.` ); + } else if ('defs' === tag.name) { + // defs unsupported + this.log( + `Found a defs element in the icon "${glyph.name}" the result may be different than expected.` + ); } else if ('rect' === tag.name && 'none' !== tag.attributes.fill) { glyph.paths.push( applyTransform(svgShapesToPath.rectToPath(tag.attributes)) From b9bcfc26b1dfc44bf8c8bcf3c8971da4c561e8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Mon, 20 Sep 2021 11:21:49 -0300 Subject: [PATCH 5/9] Improve def + use support --- src/index.js | 111 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 44 deletions(-) diff --git a/src/index.js b/src/index.js index 0339bfd..04c75a1 100755 --- a/src/index.js +++ b/src/index.js @@ -51,6 +51,16 @@ function matrixFromTransformAttribute(transformAttributeString) { return result; } +function hasParent(parentTag, parents) { + return parents.some((tag) => parentTag === tag.name); +} + +function findDefs(defs, name) { + return defs + .filter((tag) => tag.attributes.id === name.replace('#', '')) + .pop(); +} + // Rendering function tagShouldRender(curTag, parents) { let values; @@ -80,7 +90,7 @@ function tagShouldRender(curTag, parents) { return true; } } - if ('clipPath' === tag.name || 'defs' === tag.name) { + if ('clipPath' === tag.name) { return true; } return false; @@ -141,10 +151,49 @@ class SVGIcons2SVGFontStream extends Transform { this.log = this._options.log || console.log.bind(console); // eslint-disable-line } + _processElement(tag, glyph) { + if ('rect' === tag.name && 'none' !== tag.attributes.fill) { + return svgShapesToPath.rectToPath(tag.attributes); + } else if ('line' === tag.name && 'none' !== tag.attributes.fill) { + this.log( + `Found a line element in the icon "${glyph.name}" the result could be different than expected.` + ); + return svgShapesToPath.lineToPath(tag.attributes); + } else if ('polyline' === tag.name && 'none' !== tag.attributes.fill) { + this.log( + `Found a polyline element in the icon "${glyph.name}" the result could be different than expected.` + ); + return svgShapesToPath.polylineToPath(tag.attributes); + } else if ('polygon' === tag.name && 'none' !== tag.attributes.fill) { + return svgShapesToPath.polygonToPath(tag.attributes); + } else if ( + ['circle', 'ellipse'].includes(tag.name) && + 'none' !== tag.attributes.fill + ) { + return svgShapesToPath.circleToPath(tag.attributes); + } else if ( + 'path' === tag.name && + tag.attributes.d && + 'none' !== tag.attributes.fill + ) { + let pathData = tag.attributes.d; + //Found fill rule "evenodd" support + if ( + 'fill-rule' in tag.attributes && + 'evenodd' === tag.attributes['fill-rule'] + ) { + pathData = reorientPath(tag.attributes.d); + } + return pathData; + } + return null; + } + _transform(svgIconStream, _unused, svgIconStreamCallback) { // Parsing each icons asynchronously const saxStream = Sax.createStream(true); const parents = []; + const defs = []; const transformStack = [new Matrix()]; function applyTransform(d) { return new SVGPathData(d).matrix( @@ -240,6 +289,11 @@ class SVGIcons2SVGFontStream extends Transform { return; } + if (hasParent('defs', parents)) { + defs.push(tag); + return; + } + // Save the view size if ('svg' === tag.name) { if ('viewBox' in tag.attributes) { @@ -285,53 +339,22 @@ class SVGIcons2SVGFontStream extends Transform { this.log( `Found a clipPath element in the icon "${glyph.name}" the result may be different than expected.` ); - } else if ('defs' === tag.name) { - // defs unsupported - this.log( - `Found a defs element in the icon "${glyph.name}" the result may be different than expected.` - ); - } else if ('rect' === tag.name && 'none' !== tag.attributes.fill) { - glyph.paths.push( - applyTransform(svgShapesToPath.rectToPath(tag.attributes)) - ); - } else if ('line' === tag.name && 'none' !== tag.attributes.fill) { - this.log( - `Found a line element in the icon "${glyph.name}" the result could be different than expected.` - ); - glyph.paths.push( - applyTransform(svgShapesToPath.lineToPath(tag.attributes)) - ); - } else if ('polyline' === tag.name && 'none' !== tag.attributes.fill) { - this.log( - `Found a polyline element in the icon "${glyph.name}" the result could be different than expected.` - ); - glyph.paths.push( - applyTransform(svgShapesToPath.polylineToPath(tag.attributes)) - ); - } else if ('polygon' === tag.name && 'none' !== tag.attributes.fill) { - glyph.paths.push( - applyTransform(svgShapesToPath.polygonToPath(tag.attributes)) - ); } else if ( - ['circle', 'ellipse'].includes(tag.name) && + 'use' === tag.name && + tag.attributes['xlink:href'] && 'none' !== tag.attributes.fill ) { - glyph.paths.push( - applyTransform(svgShapesToPath.circleToPath(tag.attributes)) + const pathData = this._processElement( + findDefs(defs, tag.attributes['xlink:href']), + glyph ); - } else if ( - 'path' === tag.name && - tag.attributes.d && - 'none' !== tag.attributes.fill - ) { - //Found fill rule "evenodd" support - if ( - 'fill-rule' in tag.attributes && - 'evenodd' === tag.attributes['fill-rule'] - ) { - glyph.paths.push(applyTransform(reorientPath(tag.attributes.d))); - } else { - glyph.paths.push(applyTransform(tag.attributes.d)); + if (pathData) { + glyph.paths.push(applyTransform(pathData)); + } + } else { + const pathData = this._processElement(tag, glyph); + if (pathData) { + glyph.paths.push(applyTransform(pathData)); } } From 7f72d489c0fcf9e3f10e4e1ff5cf557f93a07907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Mon, 20 Sep 2021 11:56:55 -0300 Subject: [PATCH 6/9] Add support for fill rule in parent element --- src/index.js | 26 ++++++++++++++++---------- tests/expected/paesku.svg | 2 +- tests/results/paesku.svg | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/index.js b/src/index.js index 04c75a1..799c7fd 100755 --- a/src/index.js +++ b/src/index.js @@ -56,9 +56,17 @@ function hasParent(parentTag, parents) { } function findDefs(defs, name) { - return defs - .filter((tag) => tag.attributes.id === name.replace('#', '')) - .pop(); + return defs.find((tag) => tag.attributes.id === name.replace('#', '')); +} + +function hasFillRule(tag) { + return ( + 'fill-rule' in tag.attributes && 'evenodd' === tag.attributes['fill-rule'] + ); +} + +function parentHasFillRule(parents) { + return parents.some((tag) => hasFillRule(tag)); } // Rendering @@ -151,7 +159,7 @@ class SVGIcons2SVGFontStream extends Transform { this.log = this._options.log || console.log.bind(console); // eslint-disable-line } - _processElement(tag, glyph) { + _processElement(tag, glyph, parents) { if ('rect' === tag.name && 'none' !== tag.attributes.fill) { return svgShapesToPath.rectToPath(tag.attributes); } else if ('line' === tag.name && 'none' !== tag.attributes.fill) { @@ -178,10 +186,7 @@ class SVGIcons2SVGFontStream extends Transform { ) { let pathData = tag.attributes.d; //Found fill rule "evenodd" support - if ( - 'fill-rule' in tag.attributes && - 'evenodd' === tag.attributes['fill-rule'] - ) { + if (hasFillRule(tag) || parentHasFillRule(parents)) { pathData = reorientPath(tag.attributes.d); } return pathData; @@ -346,13 +351,14 @@ class SVGIcons2SVGFontStream extends Transform { ) { const pathData = this._processElement( findDefs(defs, tag.attributes['xlink:href']), - glyph + glyph, + parents ); if (pathData) { glyph.paths.push(applyTransform(pathData)); } } else { - const pathData = this._processElement(tag, glyph); + const pathData = this._processElement(tag, glyph, parents); if (pathData) { glyph.paths.push(applyTransform(pathData)); } diff --git a/tests/expected/paesku.svg b/tests/expected/paesku.svg index c836345..70e9420 100644 --- a/tests/expected/paesku.svg +++ b/tests/expected/paesku.svg @@ -9,7 +9,7 @@ + horiz-adv-x="560" d="M127.805 461.751V461.751V107.265C127.805 119.425 117.948 129.269 105.809 129.269H460.676C448.536 129.269 438.681 119.423 438.681 107.265V461.751C438.681 449.591 448.538 439.747 460.676 439.747H105.809C117.95 439.747 127.805 449.593 127.805 461.751zM97.805 461.751C97.805 466.167 101.386 469.747 105.809 469.747H460.676C465.097 469.747 468.681 466.169 468.681 461.751V107.265C468.681 102.849 465.099 99.269 460.676 99.269H105.809C101.388 99.269 97.805 102.847 97.805 107.265V461.751zM274.891 508.338V469.747V459.747H294.891V469.747V508.338V518.338H274.891V508.338zM212.891 508.338V469.747V459.747H232.891V469.747V508.338V518.338H212.891V508.338zM151.891 508.338V469.747V459.747H171.891V469.747V508.338V518.338H151.891V508.338zM336.891 508.338V469.747V459.747H356.891V469.747V508.338V518.338H336.891V508.338zM398.891 508.338V469.747V459.747H418.891V469.747V508.338V518.338H398.891V508.338zM59.193 276.16L97.784 276.16L107.784 276.16L107.784 296.16L97.784 296.16L59.193 296.16L49.193 296.16L49.193 276.16L59.193 276.16zM59.193 214.16L97.784 214.16L107.784 214.16L107.784 234.16L97.784 234.16L59.193 234.16L49.193 234.16L49.193 214.16L59.193 214.16zM59.193 153.16L97.784 153.16L107.784 153.16L107.784 173.16L97.784 173.16L59.193 173.16L49.193 173.16L49.193 153.16L59.193 153.16zM59.193 338.16L97.784 338.16L107.784 338.16L107.784 358.16L97.784 358.16L59.193 358.16L49.193 358.16L49.193 338.16L59.193 338.16zM59.193 400.16L97.784 400.16L107.784 400.16L107.784 420.16L97.784 420.16L59.193 420.16L49.193 420.16L49.193 400.16L59.193 400.16zM291.595 60.678L291.595 99.269L291.595 109.269L271.595 109.269L271.595 99.269L271.595 60.678L271.595 50.678L291.595 50.678L291.595 60.678zM353.595 60.678L353.595 99.269L353.595 109.269L333.595 109.269L333.595 99.269L333.595 60.678L333.595 50.678L353.595 50.678L353.595 60.678zM414.595 60.678L414.595 99.269L414.595 109.269L394.595 109.269L394.595 99.269L394.595 60.678L394.595 50.678L414.595 50.678L414.595 60.678zM229.595 60.678L229.595 99.269L229.595 109.269L209.595 109.269L209.595 99.269L209.595 60.678L209.595 50.678L229.595 50.678L229.595 60.678zM167.595 60.678L167.595 99.269L167.595 109.269L147.595 109.269L147.595 99.269L147.595 60.678L147.595 50.678L167.595 50.678L167.595 60.678zM507.297 292.852L468.706 292.852L458.706 292.852L458.706 272.852L468.706 272.852L507.297 272.852L517.297 272.852L517.297 292.852L507.297 292.852zM507.297 354.852L468.706 354.852L458.706 354.852L458.706 334.852L468.706 334.852L507.297 334.852L517.297 334.852L517.297 354.852L507.297 354.852zM507.297 415.852L468.706 415.852L458.706 415.852L458.706 395.852L468.706 395.852L507.297 395.852L517.297 395.852L517.297 415.852L507.297 415.852zM507.297 238.852L468.706 238.852L458.706 238.852L458.706 218.852L468.706 218.852L507.297 218.852L517.297 218.852L517.297 238.852L507.297 238.852zM507.297 176.852L468.706 176.852L458.706 176.852L458.706 156.852L468.706 156.852L507.297 156.852L517.297 156.852L517.297 176.852L507.297 176.852z" /> diff --git a/tests/results/paesku.svg b/tests/results/paesku.svg index c836345..70e9420 100644 --- a/tests/results/paesku.svg +++ b/tests/results/paesku.svg @@ -9,7 +9,7 @@ + horiz-adv-x="560" d="M127.805 461.751V461.751V107.265C127.805 119.425 117.948 129.269 105.809 129.269H460.676C448.536 129.269 438.681 119.423 438.681 107.265V461.751C438.681 449.591 448.538 439.747 460.676 439.747H105.809C117.95 439.747 127.805 449.593 127.805 461.751zM97.805 461.751C97.805 466.167 101.386 469.747 105.809 469.747H460.676C465.097 469.747 468.681 466.169 468.681 461.751V107.265C468.681 102.849 465.099 99.269 460.676 99.269H105.809C101.388 99.269 97.805 102.847 97.805 107.265V461.751zM274.891 508.338V469.747V459.747H294.891V469.747V508.338V518.338H274.891V508.338zM212.891 508.338V469.747V459.747H232.891V469.747V508.338V518.338H212.891V508.338zM151.891 508.338V469.747V459.747H171.891V469.747V508.338V518.338H151.891V508.338zM336.891 508.338V469.747V459.747H356.891V469.747V508.338V518.338H336.891V508.338zM398.891 508.338V469.747V459.747H418.891V469.747V508.338V518.338H398.891V508.338zM59.193 276.16L97.784 276.16L107.784 276.16L107.784 296.16L97.784 296.16L59.193 296.16L49.193 296.16L49.193 276.16L59.193 276.16zM59.193 214.16L97.784 214.16L107.784 214.16L107.784 234.16L97.784 234.16L59.193 234.16L49.193 234.16L49.193 214.16L59.193 214.16zM59.193 153.16L97.784 153.16L107.784 153.16L107.784 173.16L97.784 173.16L59.193 173.16L49.193 173.16L49.193 153.16L59.193 153.16zM59.193 338.16L97.784 338.16L107.784 338.16L107.784 358.16L97.784 358.16L59.193 358.16L49.193 358.16L49.193 338.16L59.193 338.16zM59.193 400.16L97.784 400.16L107.784 400.16L107.784 420.16L97.784 420.16L59.193 420.16L49.193 420.16L49.193 400.16L59.193 400.16zM291.595 60.678L291.595 99.269L291.595 109.269L271.595 109.269L271.595 99.269L271.595 60.678L271.595 50.678L291.595 50.678L291.595 60.678zM353.595 60.678L353.595 99.269L353.595 109.269L333.595 109.269L333.595 99.269L333.595 60.678L333.595 50.678L353.595 50.678L353.595 60.678zM414.595 60.678L414.595 99.269L414.595 109.269L394.595 109.269L394.595 99.269L394.595 60.678L394.595 50.678L414.595 50.678L414.595 60.678zM229.595 60.678L229.595 99.269L229.595 109.269L209.595 109.269L209.595 99.269L209.595 60.678L209.595 50.678L229.595 50.678L229.595 60.678zM167.595 60.678L167.595 99.269L167.595 109.269L147.595 109.269L147.595 99.269L147.595 60.678L147.595 50.678L167.595 50.678L167.595 60.678zM507.297 292.852L468.706 292.852L458.706 292.852L458.706 272.852L468.706 272.852L507.297 272.852L517.297 272.852L517.297 292.852L507.297 292.852zM507.297 354.852L468.706 354.852L458.706 354.852L458.706 334.852L468.706 334.852L507.297 334.852L517.297 334.852L517.297 354.852L507.297 354.852zM507.297 415.852L468.706 415.852L458.706 415.852L458.706 395.852L468.706 395.852L507.297 395.852L517.297 395.852L517.297 415.852L507.297 415.852zM507.297 238.852L468.706 238.852L458.706 238.852L458.706 218.852L468.706 218.852L507.297 218.852L517.297 218.852L517.297 238.852L507.297 238.852zM507.297 176.852L468.706 176.852L458.706 176.852L458.706 156.852L468.706 156.852L507.297 156.852L517.297 156.852L517.297 176.852L507.297 176.852z" /> From e1a117e032acf7fdaba64bb093b2cf20059ffb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Mon, 4 Oct 2021 10:21:21 -0300 Subject: [PATCH 7/9] Update with master --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 799c7fd..6e1997a 100755 --- a/src/index.js +++ b/src/index.js @@ -12,8 +12,8 @@ const { Matrix } = require('./Matrix'); const paper = require('paper'); // Transform fill-rule from evenodd to nonzero -function reorientPath(pathData) { - paper.setup('font-canvas'); +function reorientPath(pathData, width, height) { + paper.setup(new paper.Size(width, height)); var path = new paper.CompoundPath(pathData); path.reorient(); return path.pathData; @@ -187,7 +187,7 @@ class SVGIcons2SVGFontStream extends Transform { let pathData = tag.attributes.d; //Found fill rule "evenodd" support if (hasFillRule(tag) || parentHasFillRule(parents)) { - pathData = reorientPath(tag.attributes.d); + pathData = reorientPath(tag.attributes.d, glyph.width, glyph.height); } return pathData; } From 23e9106fdd428d3d1f1f739e2c78830d518bee80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Mon, 4 Oct 2021 18:08:45 -0300 Subject: [PATCH 8/9] Fix timeout issue --- tests/cli.mocha.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cli.mocha.js b/tests/cli.mocha.js index bec09c7..95dd7b7 100644 --- a/tests/cli.mocha.js +++ b/tests/cli.mocha.js @@ -37,7 +37,7 @@ describe('Testing CLI', () => { ); done(); }); - }); + }).timeout(5000); it('should work for more than 32 SVG icons', (done) => { const command = @@ -80,7 +80,7 @@ describe('Testing CLI', () => { ); done(); }); - }); + }).timeout(5000); describe('with nested icons', () => { it('should work', (done) => { @@ -111,6 +111,6 @@ describe('Testing CLI', () => { ); done(); }); - }); + }).timeout(5000); }); }); From f131f70ddfec3e674f0e84897e7cc411c1d403eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramirez=20Nicol=C3=A1s?= Date: Tue, 26 Jul 2022 18:03:18 -0300 Subject: [PATCH 9/9] fix test --- tests/expected/lotoficons-cli.svg | 2 +- tests/results/lotoficons-cli.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/expected/lotoficons-cli.svg b/tests/expected/lotoficons-cli.svg index b8d31a5..0ff37c6 100644 --- a/tests/expected/lotoficons-cli.svg +++ b/tests/expected/lotoficons-cli.svg @@ -39,7 +39,7 @@ horiz-adv-x="150" d="M79.4152 140C51.4764 140 28.8305 116.787 28.8305 88.1485C28.8305 73.56 34.7197 60.3945 44.1786 50.973L20 21.2365C24.8841 17.491 29.7681 13.7455 34.6522 10L60.6409 40.0088C66.4487 37.6266 72.7772 36.297 79.4152 36.297C107.3541 36.2969 130 59.51 130 88.1485C130 116.787 107.3541 140 79.4152 140zM79.4152 127.0371C100.3694 127.0371 117.3538 109.6274 117.3538 88.1485C117.3538 66.6696 100.3694 49.2598 79.4152 49.2598C58.4611 49.2598 41.4767 66.6696 41.4767 88.1485C41.4767 109.6274 58.4611 127.0371 79.4152 127.0371z" /> + horiz-adv-x="512" d="M9 386.181L503 100.973V123.819L9 409.027zM401.422 221.983L419.483 211.564C422.107 225.688 423.961 240.103 423.961 255C423.961 295.042 414.215 332.728 397.313 366.17L381.084 354.225C395.749 324.2 404.2 290.604 404.2 255C404.2 243.751 403.062 232.79 401.422 221.983zM175.046 352.642L325 462.942V353.8V266.018L345 254.615V353.8V502L156.447 363.409zM483.24 255C483.24 229.393 478.608 204.944 470.696 182.001L488.122 171.927C497.538 197.901 503 225.745 503 255C503 328.869 470.408 394.98 419 440.23L402.694 428.248C451.883 386.527 483.24 324.391 483.24 255zM426.45 105.642C419.06 97.171 411.282 89.048 402.695 81.752L419 69.77C427.973 77.682 436.116 86.461 443.874 95.588zM325 164.132V156.2V47.058L141.567 182.081L136.417 186H129.934H28V324H47.981L13.747 344H9V166H129.933L345 8V152.726z" /> diff --git a/tests/results/lotoficons-cli.svg b/tests/results/lotoficons-cli.svg index b8d31a5..0ff37c6 100644 --- a/tests/results/lotoficons-cli.svg +++ b/tests/results/lotoficons-cli.svg @@ -39,7 +39,7 @@ horiz-adv-x="150" d="M79.4152 140C51.4764 140 28.8305 116.787 28.8305 88.1485C28.8305 73.56 34.7197 60.3945 44.1786 50.973L20 21.2365C24.8841 17.491 29.7681 13.7455 34.6522 10L60.6409 40.0088C66.4487 37.6266 72.7772 36.297 79.4152 36.297C107.3541 36.2969 130 59.51 130 88.1485C130 116.787 107.3541 140 79.4152 140zM79.4152 127.0371C100.3694 127.0371 117.3538 109.6274 117.3538 88.1485C117.3538 66.6696 100.3694 49.2598 79.4152 49.2598C58.4611 49.2598 41.4767 66.6696 41.4767 88.1485C41.4767 109.6274 58.4611 127.0371 79.4152 127.0371z" /> + horiz-adv-x="512" d="M9 386.181L503 100.973V123.819L9 409.027zM401.422 221.983L419.483 211.564C422.107 225.688 423.961 240.103 423.961 255C423.961 295.042 414.215 332.728 397.313 366.17L381.084 354.225C395.749 324.2 404.2 290.604 404.2 255C404.2 243.751 403.062 232.79 401.422 221.983zM175.046 352.642L325 462.942V353.8V266.018L345 254.615V353.8V502L156.447 363.409zM483.24 255C483.24 229.393 478.608 204.944 470.696 182.001L488.122 171.927C497.538 197.901 503 225.745 503 255C503 328.869 470.408 394.98 419 440.23L402.694 428.248C451.883 386.527 483.24 324.391 483.24 255zM426.45 105.642C419.06 97.171 411.282 89.048 402.695 81.752L419 69.77C427.973 77.682 436.116 86.461 443.874 95.588zM325 164.132V156.2V47.058L141.567 182.081L136.417 186H129.934H28V324H47.981L13.747 344H9V166H129.933L345 8V152.726z" />