1

I have an svg with a single path with fill-rule="even-odd". I have to convert it into a font and doing so would require me to use an svg without fill-rule="even-odd". So I was wondering if theres a way to get rid of that programatically.

Here is my svg (https://pastebin.com/raw/bcKncqUZ)

Thanks

Alapan
  • 13
  • 1
  • 3
  • Just search for the string `fill-rule="evenodd"` and replace it with an empty string. – Blackhole Sep 10 '22 at 11:46
  • Please add an executable StackOverflow Snippet to your post. It will help readers execute your code with one click. And help create answers with one click. See [How to add a StackOverflow snippet](https://meta.stackoverflow.com/questions/269753/feedback-requested-runnable-code-snippets-in-questions-and-answers) – Danny '365CSI' Engelman Sep 10 '22 at 12:58

1 Answers1

2

Actually, you need to change path directions for inner "cut-out"-shapes.
For less complex svgs you could use javascript to do this programatically as described in this related question "auto colour fill when Generate Font from svg figma icon using icomoon"

In your case - you need to do this manually.
Use a vector editor like inkscape (or Adobe Illustrator).

First you need to remove unnecessary elements like the image caption.
The caption would be way too tiny in a glyph/character.

Open your svg in inkscape.
Run these Path operations:

inkscape: Break apart

  1. select all
  2. Path / Break apart
  3. Path / Exclusion
  4. save the svg

inkscape: remove overlap

inkscape: Path / Exclusion

herrstrietzel
  • 11,541
  • 2
  • 12
  • 34