Hello,
I will revive this thread . I have also noticed the dimension texts are shifted once the drawing is exported to SVG. After spending some time trying to figure out why, I have found the SVG export "magic" transformation does not work properly. As we are all rather technically oriented, I am proposing a standard engineering approach instead of magic
First of all, we must be sure the font size on screen is correct and matches the size of other elements, namely part dimensions, line thickness, dimension arrows, etc. For this we need to properly convert the (user configured) font size in mm to font point size on the logical screen device. The correct formula goes like this:
fontPointSize = ((fontSizeInMM*MMtoPixels)/logicalDPI)*inchToPoints
logicalDPI is provided by the window we are using to paint on, inchToPoints is always 72, MMtoPixels is in FreeCAD source code currently set to 10.0. Once the font size is correct, it is enough to set SVG resolution to the same DPI the screen device reports, usually 96. No black magic involved, just simple as that.
I have created a pull request with the fix, hopefully You will find it useful and suitable for merge.
The downside of this fix is the default font sizes must be adjusted and the users will need to update their font size configuration, otherwise the (currently default) 3.5mm sized font becomes quite hard to read. Nevertheless this is correct, because the full height is reserved only for the tallest font glyphs like | (pipe character) or ▯ (non-existing glyph placeholder).
Kind regards,
Tomas