I'm transforming my SVG icons to fonts by icomoon.io and I wanna use them in my React web app
the problem is when I import these three SVG icons to the Icomoon project, the appearance of my icons will change and I don't know why this is happening
other SVGs imported properly and without any change in appearance
SVG icons before import:
after importing to icomoom.io:
I also added SVG icons code here: codesandbox
Is it possible that the problem is with the SVGs icons?


Your icon
<path>elements have a non ideal structure (at least for apps like icomoon):fill-rulelike "evenodd":your paths need alternating path directions
dattribute (pathdata string) should start with the outer most shapes/sub pathsFix issues with java script helper methods
How it works
to an array of absolute commands via
path.getPathData({normalize: true}):all commands will be converted to a reduced set of commands using only M, L, C, Z commands.
splitSubpaths(pathData)splits up path data into sub paths (each sub path starts with a new M command)sortSubpaths(pathDataArr)sorts sub paths by their x and y position:The left most sub paths will become the first element
fixInnerPathDirections(svg, path, pathDataSubArr)compares outer and inner path directions (using the helperisClockwise(path):if the outer sub path is drawn clockwise – all inner sub paths need to be counter-clockwise (or vice versa)
Codepen example:
You can also play around with this codepen helper: Fix svg compound path direction
Alternative: refactor paths in an graphic editor
See also: "Converting an svg with fill-rule="evenodd" to fill-rule="nonzero""