I think I could do it relatively quickly with the c library nanosvg but it's not the most convenient interface and it might be more work if you don't already have a personal version rigged up to use (I remember forking it very slightly to fix bugs, but not which ones)