Opened 13 years ago
Closed 10 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:
Attachments (5)
Change History (29)
comment:1 by , 13 years ago
Keywords: | labels added |
---|
comment:2 by , 13 years ago
Cc: | added |
---|
comment:3 by , 13 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 , 13 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 , 13 years ago
I'm having the same issue. I'd be happy to run a diagnostic build if it would help.
by , 13 years ago
Attachment: | 7841testcase.osm added |
---|
comment:6 by , 13 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 , 13 years ago
Attachment: | 7841output.txt added |
---|
by , 13 years ago
Attachment: | 7841screenshot.png added |
---|
by , 13 years ago
Attachment: | 784-more-streets.osm added |
---|
comment:8 by , 13 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 , 13 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 , 13 years ago
Attachment: | 7841-correct.png added |
---|
comment:10 by , 13 years ago
Output in the first testcase looks correct, and the logged message is "isGlyphVectorBug: x 2000".
comment:14 by , 11 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 , 11 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 , 11 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 , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:18 by , 11 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.
follow-up: 20 comment:19 by , 11 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.
follow-up: 21 comment:20 by , 11 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.
follow-up: 23 comment:21 by , 10 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:23 by , 10 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.
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.