Whole bunch of SVG tag types and SVG classes in 2.3.2 SVG exported files
Hi men
I'm trying to put together a simple C utility software aimed at optimizing the size of the SVG files exported by MS 2.3.2. I'm "sniffing" how MS 2.3.2 exports its notation items, and by now I found the bunch of classes you can see in the attached .png file. As I would like to make my little program aware of each and every classes that can occur in an MS 2.3.2 SVG file, I need a COMPLETE list of the classes and the tag types MS 2.3.2 uses in its exports. Where can I find it (without having to get the whole project files, that contain a HUGE amount of tangled data)? The best solution would be if one of the developers could provide the two lists here, as a reply to this post.
Even though I'm trying to put my utility program together for personal use, if I succeed, I will share it with whoever could find it useful.
P.S. By editing the SVG files by hand, I discovered that by grouping SVG elements with shared attributes and by applying "use /" tags instead of so many "path d="..."" tags, the file size can be easily reduced from 50% to 75% of the original, with the same graphic result. It's a time wasting and boring process, though, so I would like to automatize it, and I think I can.
Attachment | Size |
---|---|
classes_and_tags.png | 30.57 KB |
Comments
Looking at https://github.com/musescore/MuseScore/blob/9e456031cf1e843aab2a96322d6… it seems the possible list would be https://github.com/musescore/MuseScore/blob/9e456031cf1e843aab2a96322d6…
In reply to Looking at https://github… by jeetee
At first sight, it looks like what I was asking for. Many, many thanks indeed. I have a question, though: is this the generator in 2.3.2 or in 3.4? Because the SVG files generated by the two versions are different.
In reply to At first sight, it look like… by Aldo
No, for 2.3.2 check https://github.com/musescore/MuseScore/blob/v2.3.2/mscore/svggenerator… and https://github.com/musescore/MuseScore/blob/v2.3.2/libmscore/element.cp…
In reply to No, for 2.3.2 check https:/… by Jojo-Schmitz
Then THIS is EXACTLY what I whas looking for. Many thanks to both of you, I'm studying the code right now.