Modify

Opened 4 years ago

Closed 4 years ago

Last modified 16 months ago

#11266 closed enhancement (fixed)

[Patch] Fix SVG version of JOSM logo

Reported by: floscher Owned by: floscher
Priority: minor Milestone: 15.05
Component: Core Version:
Keywords: svg logo Cc:

Description

https://josm.openstreetmap.de/svn/trunk/images/logo.svg?p=8152 looks fine when viewed with a web browser or Inkscape, but when processed for example with imagemagick it produces very strange artifacts (see attachment).

I have a patch that solves this, but before supplying it here I wanted to ask, how you prefer the SVG source to be formatted: Minified (like before) or pretty formatted and indented?

Are you also interested in an SVG version of the OAuth logo (derived from http://wiki.oauth.net/w/page/12238520/Logo but with only 5kiB)?

Attachments (7)

logo.png (243.8 KB) - added by floscher 4 years ago.
File created by ImageMagick (with command "convert logo.svg logo.png").
oauth.png (30.9 KB) - added by stoecker 4 years ago.
Wrong display of SVG
glitches.png (100.6 KB) - added by floscher 4 years ago.
oauth-konqueror.jpg (136.4 KB) - added by floscher 4 years ago.
button.gif (5.0 KB) - added by floscher 4 years ago.
demo.jpg (78.5 KB) - added by floscher 4 years ago.
png-svg.gif (12.6 KB) - added by floscher 4 years ago.

Download all attachments as: .zip

Change History (22)

Changed 4 years ago by floscher

Attachment: logo.png added

File created by ImageMagick (with command "convert logo.svg logo.png").

comment:1 Changed 4 years ago by Don-vip

Keywords: svg logo added
Milestone: 15.04

I'd say minified, as before. We're interested with every other svg image we can get :)

comment:2 Changed 4 years ago by floscher

Great, I've now prepared the patch for you: https://github.com/floscher/josm/commit/927a01f1e9d29ade584b45742820c26eaa6624f9?short_path=e692d92 . For the raw patch see https://github.com/floscher/josm/commit/927a01f1e9d29ade584b45742820c26eaa6624f9.patch

The JOSM logo is based on https://commons.wikimedia.org/w/index.php?title=File:JOSM_Logo_2014.svg, which is in turn based on the current version in the JOSM-SVN-repo (edited by Wikimedia-user TDiamond and me).
The visual appearance has not changed (at least as far as I have noticed).

The OAuth logo is based on the logo is based on http://wiki.oauth.net/w/page/12238520/Logo as said above. I made its outline rounder (previously it was formed by cubic curves) and minified it.

comment:3 Changed 4 years ago by floscher

Owner: changed from team to floscher
Status: newassigned
Summary: Fix SVG version of JOSM logo[Patch] Fix SVG version of JOSM logo

comment:4 Changed 4 years ago by stoecker

I checked it and have an issue with the oauth logo - The old logo looks bad in the buttons, the new one even (a little) worse.

My suggestion:

  • Can you make the oauth-logo as SVG (with the text beside it) and your new SVG. Maybe even a bit fancier, as we display this larger and have a lot of space to the right.
  • Make a oauth.logo for low resolution (i.e. only a single border, the A bigger, maybe remove text completely), so that it looks good at the small buttons.

comment:5 Changed 4 years ago by stoecker

Also it seems the masking of the inner block somehow fails. The logo locks as if the grid is displayed completely. Maybe another black ring in front of it could help? (Preview in my version of konqueror is also missing the mask, full display is correct.)

Wrong display of SVG

Note: you don't need to strip the SVG too much. It's passed to svgcleaner before building the JAR file. So auto-strippable stuff (inkscape tags, ...) can remain. Only the logical changes are required.

Last edited 4 years ago by stoecker (previous) (diff)

Changed 4 years ago by stoecker

Attachment: oauth.png added

Wrong display of SVG

comment:6 Changed 4 years ago by floscher

Thanks for the hints, I'll improve the large logo (fix masking, add text on the side) and add a version for small display.

Yes, the grid is displayed completely, my version of konqueror (4.13.3) also displays the whole grid. It seems that Konqueror does not understand this mask (Firefox, Chrome, ImageMagick and Inkscape display it correctly, I didn't test it with Konqueror before).

comment:7 Changed 4 years ago by stoecker

Milestone: 15.0415.05

Changed 4 years ago by floscher

Attachment: glitches.png added

Changed 4 years ago by floscher

Attachment: oauth-konqueror.jpg added

Changed 4 years ago by floscher

Attachment: button.gif added

comment:8 Changed 4 years ago by floscher

It's been a while now, but I finally prepared a better patch. Or more precisely two variants of this patch :).

The source of the display glitches in Konqueror is the rendering engine KHTML used in Konqueror by default, which obviously can't cope with SVG masks, patterns and some other stuff, which I find quite essential for building complex SVG graphics. By the way, the OAuth-logo is not the only SVG in this repo that is not displayed correctly in Konqueror with KHTML (e.g. logo.svg, changeset.svg or lottery.svg):

If you want to view SVG in Konqueror, I'd recommend to switch to the WebKit rendering engine (e.g. under Ubuntu just issue the command sudo apt-get install kpart-webkit), then everything is fine.

Therefore as I said above, I've prepared two patches. One that removes the glitches of the OAuth logo in Konqueror, but is not so elegant (it uses a black ring in front of the grid as you suggested above). The other one is better in my eyes, but still doesn't display correctly in Konqueror:

The patch that looks ok in Konqueror with KHTML can be found here:
https://github.com/floscher/josm/commit/8c9a02da05f01414284b8c5de9de6ffaa1986509.patch
The smaller one that still has glitches in Konqueror with KHTML can be found here:
https://github.com/floscher/josm/commit/4a0e6222b470981173c0f94fbc1f5649ac79fbf2.patch

The JOSM logo still has glitches in Konqueror with KHTML, because I think it would be too much work for very little benefit. If someone feels the urge to also fix the glitches for the JOSM logo, go ahead, but I'll guarantee you that this would raise the file size significantly. I'd consider that rather a workaround for KHTMLs weak points than an improvement to the logo.


Then I've also created a patch that improves the display of icons on buttons. Previously these have been cropped by 5% both at the top and at the bottom (1px from a 20×20 icon) when hovering over the button. The patch solves this by increasing the height of all SideButtons by 2px so that the complete icon fits in when hovering:
(right one is old, left one new)

That patch can be found here: https://github.com/floscher/josm/commit/6e930a144943f7c37b48f33b3653435b13632e2f.patch

comment:9 Changed 4 years ago by stoecker

Hmm, Actually as the name says SideButtons are buttons for the side. They aren't meant for normal dialogs.

Regarding konqueror: I only used this as example for the same display issue in Java. Whether it works in konqueror or not I don't care if it looks ok in Java.

Changed 4 years ago by floscher

Attachment: demo.jpg added

comment:10 Changed 4 years ago by floscher

Then I misunderstood you regarding Konqueror. I've now modified the patch again a bit and attached a screenshot below which shows how it looks in JOSM. What do you think?

Actually, the SideButtons are in use in various dialogs, even for the OK/Cancel/Help-buttons in the main Preferences dialog. Probably because the class has a convenient mechanism for adding icons. But anyway, would it be a problem to change the insets of all SideButtons, so that the icons are no longer cropped?

Changed 4 years ago by floscher

Attachment: png-svg.gif added

comment:12 Changed 4 years ago by floscher

In the meantime I've also replaced some more PNGs by SVGs:

https://github.com/floscher/josm/commit/f686c164acda5077e38064b8f6dc2dff7782d396.patch

comment:13 Changed 4 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 8442/josm:

Fix #11266 - SVG versions of JOSM and OAuth logos + some other buttons (patch by floscher)

comment:14 Changed 4 years ago by Don-vip

In 8484/josm:

see #11266 - tagging presets icons: avoid unnecessary I/O access to non-existing png file + javadoc

comment:15 Changed 16 months ago by Don-vip

The text "JOSM" has disappeared from our logo in r8442, see #16042

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain floscher.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.