I was able to get Rack to display the slash by editing the file in Inkscape, but that caused a large number of extraneous differences. So instead I decided to see if I could more selectively hack the Marbles.svg file.
It turned out that all I needed to do was make a small edit to path1311 and change the order in which the four corner points of the slash are drawn.
I’m curious if anyone has found any other solutions to this problem.
It can also be faked: draw the figure separately over the glyph. I have to do that on a number of Mutants faceplates. I like your solution better though, it is an actual solution and it might help me fix a Monsters problem where drawing the hole part over is not an option, I’ll just have to try it
I second this statement. Drawing on your panel from your plugin’s C++ code is straightforward. I usually use C++ instead of SVG for graphics only when something on my panel needs to change over time. For example, I use C++ to draw orange glowing dots on attenuverter knobs, but only when the low-sensitivity option is enabled:
In your case, you could override ModuleWidget::draw and just draw a line where you need it, like @Bloodbat said.
Besides C++, there is another SVG-related possibility if you are interested. There are places in my plugin where I stack multiple SVG files. The base layer is the basic panel SVG as usual.
Then I stack extra SVG layers that are mostly transparent empty space, but might have a word or two of text paths. For example, in Tube Unit, I have a port that dynamically changes its label between VENT and SEAL.
So I have a panel with almost everything in it, then the word VENT in another SVG, and the word SEAL in a third SVG, all stacked together in the widget. The trick is you can hide one of the layers and show the other. This is how either word appears, but not both.
Your case would be simple: add a second SVG on top of the first and just leave it alone.
I can share code links if you are interested in either example.