strange svg behavior on wiki

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
momentumv5
Posts: 58
Joined: Thu Nov 17, 2011 2:05 pm

strange svg behavior on wiki

Post by momentumv5 »

I was trying to upload some svg's to the wiki, and it kept on producing very strange thumbnails.
for instance see here: https://sourceforge.net/apps/mediawiki/ ... _Mouse.svg
if you click on any of the strange thumbnails, it takes you to the SVG, which happens to render properly by the web browser and each of the "versions" is the same.
if you embed the svg on a page with the

Code: Select all

[[File:name.svg]]
then it renders poorly, as the thumbnail.
So apparently this is something in the wiki's thumbnail generator for svg's. Anyone know what's going on? Is SF's mediawiki out of date?
Momentum V5 Systems
Unlike momentum, knowledge is not necessarily conserved.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: strange svg behavior on wiki

Post by NormandC »

No idea why it does that, but it happened to me too. So I converted to PNG... :|

Cool icon. Where do you plan to use it?
momentumv5
Posts: 58
Joined: Thu Nov 17, 2011 2:05 pm

Re: strange svg behavior on wiki

Post by momentumv5 »

I was just going to "improve" the graphics on the mouse commands page. lack of proper svg support == :(
Momentum V5 Systems
Unlike momentum, knowledge is not necessarily conserved.
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: strange svg behavior on wiki

Post by yorik »

Yes that's a limitation of the wiki svg renderer... at least the version that is installed here on SF. But we already saw several other renderers that have similar problems, for ex. on some versions of windows.

Basically I found that those bad renderers don't like straight corners. What I usually do to fix badly rendered icons:

- Change some corners (specially those that don't appear) to bezier (which have little handles) instead of straight corners
- Add intermediary points in the middle of some straight segments (and make them bezier)

It's a bit annoying bit currently it's the only way...
momentumv5
Posts: 58
Joined: Thu Nov 17, 2011 2:05 pm

Re: strange svg behavior on wiki

Post by momentumv5 »

yorikvanhavre wrote:Yes that's a limitation of the wiki svg renderer... at least the version that is installed here on SF. But we already saw several other renderers that have similar problems, for ex. on some versions of windows.

Basically I found that those bad renderers don't like straight corners. What I usually do to fix badly rendered icons:

- Change some corners (specially those that don't appear) to bezier (which have little handles) instead of straight corners
- Add intermediary points in the middle of some straight segments (and make them bezier)

It's a bit annoying bit currently it's the only way...
oh, so I could just say, make the radius VEEEERRY SMALL to get corners. hmm. good plan. Will implement. Thanks.
Momentum V5 Systems
Unlike momentum, knowledge is not necessarily conserved.
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: strange svg behavior on wiki

Post by yorik »

You don't need to actually make it round... Just add the handles works.
momentumv5
Posts: 58
Joined: Thu Nov 17, 2011 2:05 pm

Re: strange svg behavior on wiki

Post by momentumv5 »

yorikvanhavre wrote:You don't need to actually make it round... Just add the handles works.
Just for completeness, the relevant inkscape tool is "make selected segements curves" and then it will add the handles without changing the path's ... er... path.
Momentum V5 Systems
Unlike momentum, knowledge is not necessarily conserved.
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: strange svg behavior on wiki

Post by yorik »

momentumv5 wrote:Just for completeness, the relevant inkscape tool is "make selected segements curves" and then it will add the handles without changing the path's ... er... path.
Ah, good to know... the "wiki tweak tool" :)
Post Reply