Modify

Opened 12 years ago

Closed 9 years ago

#7841 closed defect (fixed)

Flying street name labels for JOSM 5315

Reported by: justynjj Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Flying Street Names labels Cc: pbb

Description

This bug was found about a month ago and is mentioned here by Tom Morris in JOSM v5267:

http://forum.openstreetmap.org/viewtopic.php?pid=249937

I've just downloaded the latest version of JOSM for OSX v5315 and the problem still exists.

Basically, street names don't line up with the street that they represent. The names appear to float around in another layer. It's as if the translations of the street name's layer are being calculated incorrectly.

Please see this video by Tom Morris which visually shows the problem:

https://www.youtube.com/watch?v=80Sf6m06uO0

Attachments (5)

7841testcase.osm (1.3 KB ) - added by bastiK 12 years ago.
7841output.txt (5.6 KB ) - added by John Firebaugh 12 years ago.
7841screenshot.png (192.8 KB ) - added by John Firebaugh 12 years ago.
784-more-streets.osm (1.7 MB ) - added by bastiK 12 years ago.
7841-correct.png (853.4 KB ) - added by John Firebaugh 12 years ago.

Change History (29)

comment:1 by pbb, 12 years ago

Keywords: labels added

I am having the exact same issue. It seems to be a Mac-related problem, I am not having any problems on my Windows machine. Only labels with rotated text are "flying"; labels that are printed horizontally are where they should be.

The "flying" effect is caused by the labels getting double the offset from the top-left corner of the viewport. When a street is in the top-left corner, then the label is in the right place, but when the street is in the middle of the screen then the label is all the way to the bottom-right.

comment:2 by pbb, 12 years ago

Cc: pbb added

comment:3 by anonymous, 12 years ago

Just to update, I am also using a Mac OSX 10.7.4 and have updated to JOSM v5356 where the problem still exists. If there is any more information you need in order to fix this, please let us know.

comment:4 by bastiK, 12 years ago

I can probably track down the reason for this bug and fix it, but you'll have to run a customized JOSM, open a sample file and report back the console output. Please email phaaurlt@… and I'll send you the files.

comment:5 by John Firebaugh, 12 years ago

I'm having the same issue. I'd be happy to run a diagnostic build if it would help.

by bastiK, 12 years ago

Attachment: 7841testcase.osm added

comment:6 by bastiK, 12 years ago

Please run debug build http://josm.openstreetmap.de/download/dev/josm7841diag.jar, activate PL 2 mappaint style, and open test file (7841testcase.osm). Report console output and screenshot.

by John Firebaugh, 12 years ago

Attachment: 7841output.txt added

by John Firebaugh, 12 years ago

Attachment: 7841screenshot.png added

comment:7 by John Firebaugh, 12 years ago

Done, hope it helps. :)

by bastiK, 12 years ago

Attachment: 784-more-streets.osm added

in reply to:  7 comment:8 by bastiK, 12 years ago

Replying to John Firebaugh:

Done, hope it helps. :)

Yes, it does. Please try the new build http://josm.openstreetmap.de/download/dev/josm7841diag2.jar, I hope it fixes the problem.

Please report console output, should be just one line.

In case the label seems aligned correctly:

  • please open 784-more-streets.osm
  • click on one of the coordinates in the lower left status bar
  • enter "100" as Zoom and confirm
  • take screenshot

comment:9 by bastiK, 12 years ago

For the record:

The output (7841output.txt) John gets, is identical with mine. This means all the numbers in drawTextOnPath are computed correctly, including the final transform in the last for loop. However, the result looks, as if the x- and y-translation of the transform is double of what it actually is. Both the halo

Shape textOutline = gv.getOutline();
g.fill(textOutline);

and the normal stroke

g.drawGlyphVector(gv, 0, 0);

are affected in the same way.

I haven't found any bug report on this yet, which is a little strange.

by John Firebaugh, 12 years ago

Attachment: 7841-correct.png added

comment:10 by John Firebaugh, 12 years ago

Output in the first testcase looks correct, and the logged message is "isGlyphVectorBug: x 2000".

comment:11 by bastiK, 12 years ago

Ok, great!

comment:12 by bastiK, 12 years ago

Resolution: fixed
Status: newclosed

In 5403/josm:

fixed #7841 - Flying street name labels

comment:13 by Don-vip, 12 years ago

Nice job. Not an easy bug to fix :)

comment:14 by Haruka, 10 years ago

This bug is reappearing on my end now (OS X 10.10).

Version info:

Version 7586
Last change at 2014-09-26 13:10:26 +0200 (Fri, 26 Sep 2014)
Java Version 1.7.0_06

comment:15 by anonymous, 10 years ago

More info:

I was trying to standardize road names, and found that only Chinese names are still affected by this bug. When I changed the name to English it displays on the road without any problems.

comment:16 by bastiK, 10 years ago

See #10446: In the meantime the fix in this ticket has been removed as it seemed, Java 7 on Mac is no longer affected.

Note, that English text is rendered with font Droid sans and Chinese text with the native Mac font, so this might be the trigger. Still pretty weired.

comment:17 by bastiK, 10 years ago

Resolution: fixed
Status: closedreopened

comment:18 by Don-vip, 10 years ago

This is also with a very old java version and a beta version of osx... Can you please test with 7u67 and 8u20? Java 7u6 is an antedeluvian version for osx.

comment:19 by double-m, 9 years ago

Whether this issue is present or not apparently depends on the Font.

I was having this issue with a plug-in which adds custom TextElements, to which it passes

new Font(Font.SANS_SERIF, Font.PLAIN, 14)

This means that depending on the glyph-bug setting, either the plug-in labels or the standard JOSM labels would be rendered wrong.

I manually changed the font in the plug-in code to "Droid Sans", and now it works. This is very strange.

Last edited 9 years ago by double-m (previous) (diff)

in reply to:  19 ; comment:20 by bastiK, 9 years ago

Replying to double-m:

Whether this issue is present or not apparently depends on the Font.

I was having this issue with a plug-in which adds custom TextElements, to which it passes

new Font(Font.SANS_SERIF, Font.PLAIN, 14)

This means that depending on the glyph-bug setting, either the plug-in labels or the standard JOSM labels would be rendered wrong.

I manually changed the font in the plug-in code to "Droid Sans", and now it works. This is very strange.

Please add a status report.

in reply to:  20 ; comment:21 by anonymous, 9 years ago

Replying to bastiK:

Please add a status report.

I'm not sure I understand - I have nothing to add about the status of this ticket. I was only observing that, on my system, some fonts require glyph-bug=true and some require glyph-bug=false, and the respective other ones break.

I don't have a solution. Except don't mix the two kinds of fonts. :-(

comment:22 by double-m, 9 years ago

This was me BTW.

in reply to:  21 comment:23 by bastiK, 9 years ago

Replying to anonymous:

Replying to bastiK:

Please add a status report.

I'm not sure I understand - I have nothing to add about the status of this ticket.

This please: Help/Action/ShowStatusReport
It gives us information about your system, so we can see which versions are affected and which are not.

comment:24 by bastiK, 9 years ago

Resolution: fixed
Status: reopenedclosed

In 7752/josm:

fixed #7841 - Flying street name labels on Mac
(Behaviour is different for each font, so check each font.)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.