purplebamboo / font-carrier

font-carrier是一个功能强大的字体操作库,使用它你可以随心所欲的操作字体。让你可以在svg的维度改造字体的展现形状。

Home Page:http://purplebamboo.github.io/font-carrier/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

svgo压缩过的svg,导出字体时报错"SvgPath: param should start with 0..9 or `.` (at pos 44)"

rainysir opened this issue · comments

原始svg
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M12 4C12.4971 4 12.9 4.40294 12.9 4.9V11.1H19.1C19.5971 11.1 20 11.5029 20 12C20 12.497 19.5971 12.9 19.1 12.9H12.9V19.1C12.9 19.5971 12.4971 20 12 20C11.5029 20 11.1 19.5971 11.1 19.1V12.9H4.9C4.40294 12.9 4 12.497 4 12C4 11.5029 4.40294 11.1 4.9 11.1H11.1V4.9C11.1 4.40294 11.5029 4 12 4Z" fill="#333333"/> </svg>
压缩过后svg
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 4a.9.9 0 01.9.9v6.2h6.2a.9.9 0 110 1.8h-6.2v6.2a.9.9 0 11-1.8 0v-6.2H4.9a.9.9 0 010-1.8h6.2V4.9A.9.9 0 0112 4z" fill="#333"/></svg>
lib/svg/path.js svgpath方法报错,抛出错误 "SvgPath: param should start with 0..9 or . (at pos 44)"

svgo压缩方法