[SOLVED]New SVG graphics with text are an utter disaster in Firefox
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[SOLVED]New SVG graphics with text are an utter disaster in Firefox
Couldn't you test in other browsers before implementing this? Apparently this is caused by my Firefox profile for unknown reasons. Sorry for the noise. at myself
This is a HUGE usability issue.
Feature_editing#Different_sketches
Screenshot from Firefox 66.0.3:
This is a HUGE usability issue.
Feature_editing#Different_sketches
Screenshot from Firefox 66.0.3:
Last edited by NormandC on Sat Apr 20, 2019 5:37 pm, edited 6 times in total.
Re: New SVG graphics with text are an utter disaster in Firefox
Yorik wrote:ping
Any idea if this is fixable? The old SVG image for the Basic Part Design Tutorial had the same issue, which is why I switched it to a PNG image. This is the SVG: https://www.freecadweb.org/wiki/File:Tu ... _Sheet.svgkkremitzki wrote:ping
I could only find this thread on Stack Overflow: https://stackoverflow.com/questions/458 ... fox-and-ie
But contrary to what they say, this is still an issue in FF 66.0.3.
-
- Posts: 437
- Joined: Wed Sep 15, 2010 9:38 am
Re: New SVG graphics with text are an utter disaster in Firefox
I have no issues on Firefox v66 and Ubuntu 18.04.
Re: New SVG graphics with text are an utter disaster in Firefox
Please post a screenshot.
- kkremitzki
- Veteran
- Posts: 2517
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: New SVG graphics with text are an utter disaster in Firefox
I haven't made any changes to the wiki recently, could you provide more context on what brought this issue about?
Re: New SVG graphics with text are an utter disaster in Firefox
Sorry if I wasn't clear, the whole topic is about new SVG files on the wiki added by vocx. The SVG files contain text, and in Firefox the text is blown up out of proportion.
I pinged you since you're pretty knowledgeable about the wiki.
See how one SVG displays in Firefox, compared to Chromium:
Firefox
Chromium
I pinged you since you're pretty knowledgeable about the wiki.
See how one SVG displays in Firefox, compared to Chromium:
Firefox
Chromium
Re: [SOLVED]New SVG graphics with text are an utter disaster in Firefox
As I was puzzled with this reply, and too impatient to wait for Galou's screenshot, I thought of creating a fresh Firefox profile. The SVG files display properly sized text inside SVG files.
A quick examination of my own profile's preferences VS. the fresh one don't show anything different regarding text size.
I remain puzzled. Will search further. Sorry for the noise.
Re: [SOLVED]New SVG graphics with text are an utter disaster in Firefox
I don't know if the original intent was to make images that can be translatable; but it's a good thing, intended or not. I'll be able to edit the SVG files in Inkscape to translate relevant text strings.
Re: [SOLVED]New SVG graphics with text are an utter disaster in Firefox
SVGs are preferred for simple diagrams that include text because they are vector images and can be scaled without loss of detail. They can be made bigger or smaller and they won't distort like bitmap images (PNG, TIFF, JPEG). Also, SVGs are text files, so they are smaller than bitmaps for an image of equivalent size and resolution; for example, a PNG of 400 KB, may be only 35 KB in SVG. This may not be a problem for small files, but when you have thousands of images it may save significant space to use SVG. In particular, FreeCAD's documentation could be smaller if SVGs are used instead of bitmaps (whenever it makes sense, of course).
SVG can also be opened and edited in a program like Inkscape to fix things, precisely like changing or translating strings.
If you are going to translate the strings, I recommend you check that you have a <text> element in your SVG. The actual code produced by Inkscape is something like this, <text><tspan>Actual text here</tspan></text>.
Code: Select all
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:3.96875px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="83.119522"
y="-16.792206"
id="text20531-6"><tspan
sodipodi:role="line"
id="tspan20529-0"
x="83.119522"
y="-16.792206"
style="font-size:3.52777767px;stroke-width:0.26458332px">Solid</tspan></text>
Code: Select all
<flowRoot
xml:space="preserve"
id="flowRoot1999"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion2001"><rect
id="rect2003"
width="108.57143"
height="57.142857"
x="215.71428"
y="233.94826" /></flowRegion><flowPara
id="flowPara2007">Some flow text</flowPara></flowRoot>
--------
As to why the file Tutorial_Drawing_Sheet.svg may have looked wrong before, it's hard to tell. It's an SVG file generated from TechDraw, which uses the Qt functions to generate SVG. These functions may have added some transformations to the elements of the SVG.
Code: Select all
transform="rotate(-60.0,200.0,150.0) translate(200.0,150.0) scale(4.0,-4.0)">
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: [SOLVED]New SVG graphics with text are an utter disaster in Firefox
No, it was made in the old Drawing workbench. Look at the date of creation, it was uploaded in 2014.vocx wrote: ↑Mon Apr 22, 2019 6:37 pm As to why the file Tutorial_Drawing_Sheet.svg may have looked wrong before, it's hard to tell. It's an SVG file generated from TechDraw
This SVG displays correctly now with a new Firefox profile. I had migrated the same FF profile over multiple Ubuntu versions, it may be 5 years or more old...