Skip to main content
6 events
when toggle format what by license comment
Nov 9, 2016 at 9:15 comment added Chris H @jpa and the rounding errors are real. On a toy example the first quadratic curve of a zero differs by 1 in the sixth decimal place -- enough to screw up hashing
Nov 3, 2016 at 14:55 comment added Chris H @jpa you could, but if normalising the origin introduced rounding errors the hash wouldn't match. The script I'm thinking of would call inkscape's text-to-path to lay out the character paths but then replace them with references to a set of masters.
Nov 3, 2016 at 14:49 comment added jpa @ChrisH I can't see why one couldn't dedup afterwards just as well. Just normalize all paths to origin at starting point, take hash, use that to find if the path has occurred already. Sure, not as elegant, but should work and could be easier to implement than having to reimplement / figure out all the text layout logic.
Nov 3, 2016 at 13:30 comment added Chris H @jpa deduping before (or while) converting to paths would be the way to go, surely. Replace all instances of text char "1" with <use xlink:href="#digit_one"> where digit_one is a path
Nov 3, 2016 at 6:15 comment added jpa While this answer presents multiple possible solutions, SVGO seems most interesting. It could also be run on .svg file to optimize it. However it does not seem to currently do path deduplication. If the asker ends up doing custom scripting anyway, doing it as an enhancement to SVGO might be a good idea.
Nov 2, 2016 at 23:51 history answered Luke CC BY-SA 3.0