mapsforge / vtm

OpenGL vector map library - running on Android, iOS, Desktop and browser.
GNU Lesser General Public License v3.0
268 stars 89 forks source link

Render themes new SVG resources #251

Closed devemux86 closed 7 years ago

devemux86 commented 7 years ago

Review SVG symbols opting for "positive + white glow" variant.

devemux86 commented 7 years ago

Should be done in parallel with https://github.com/mapsforge/mapsforge/issues/904.

andreynovikov commented 7 years ago

When I try to open new SVGs with Inkscape (SVG editor I've always used) it silently closes. I've checked, files are ok. Any idea on what's wrong with Inkscape or what other SVG editor to use?

devemux86 commented 7 years ago

Interesting, Inkscape crashes here too.. (most of the time we use simple text editing for changes like that)

Seems it doesn't like the new "white glow" rules.. :slightly_frowning_face: For example if we remove them here in parking.svg then it opens.

Note that svg are also cleaned with SVG Cleaner for better compatibility with svg libraries.

@eartrumpet any hint on this?

andreynovikov commented 7 years ago

Also, some symbols missing that are referenced in default style. For instance hairdresser.

devemux86 commented 7 years ago

I double checked only the active symbols in the themes (e.g. this is commented). But we could add more now as we process them.

Regarding Inkscape, could you mention it also in relevant forum topic? (forum is usually watched more by theme creators)

eartrumpet commented 7 years ago

I'm aware of it. This happens with some files after using SVG cleaner. I have the original soure files which were created/edited in Inkscape, but I only use cleaned versions in themes, for compatibility and size reasons. In my experience they work well with all enviroments I tested (mapsforge on Android/Java, Locus own SVG engine).

andreynovikov commented 7 years ago

May be put a reference to the source files then? (May be in wiki?) Sometimes I want to modify/add something in the icons but no I can not do it.

devemux86 commented 7 years ago

That time we saw with other theme creators (like @eartrumpet mentioned), that svg files as produced by Inkscape or Illustrator contain too much "noise" data, making them not compatible with usual svg readers.

Indeed we could mention all these somewhere (BTW we don't have yet a theme wiki in VTM). :slightly_smiling_face:

eartrumpet commented 7 years ago

It's also possible to make those SVG files work with Inkscape again by removing the "white glow" with a text editor (every path with opacity="0.8" stroke="#ffffff" stroke-width="64")

devemux86 commented 7 years ago

@eartrumpet indeed that's what I saw too. Maybe Inkscape doesn't like some tag from "white glow"?

eartrumpet commented 7 years ago

Maybe Inkscape doesn't like some tag from "white glow"?

Strange thing is, that I created the "white glow" with Inkscape in the first place. Maybe SVG Cleaner removes/adds something Inkscape misses. But I didn't investigate further, as I can live with it as long as everything renders fine on the maps.

andreynovikov commented 7 years ago

@eartrumpet Can you process all the icons or share the script you did it with?

eartrumpet commented 7 years ago

Can you process all the icons or share the script you did it with?

Sorry, no script as a lot of the original SJJB icons are not well constructed and needed clean up/simplification by hand, so manually adding of the white glow was quicker than making a script.

devemux86 commented 7 years ago

A quick guide (with a text editor):