From: Krzysztof K. <twe...@gm...> - 2014-07-22 02:54:28
|
Hello To implement a reasonably good SVG path writer, we need a function that converts a double to the shortest string that will parse back to the original value. g_ascii_strtod() does not do this. The state-of-the-art library for this task is libdouble-conversion; the sources take up around 320 kB. Can I use this library as dependency, or should I include its sources in the 2Geom tree? By opting for the latter approach, I could make some tweaks to the source, e.g. remove unnecessary functions, change it to work with std::string instead of some strange one-off class and correct some configuration mistakes; for example, the library always assumes that 32-bit Linux suffers from double rounding, aka GCC bug 323, whereas it's sufficient to compile with -mfpmath=sse and the problem goes away. On the other hand, in-tree libraries are not a good practice in general. Regards, Krzysztof |